Simplify, hoo-boy. Also don't unregister the schemes in next.minor

Mon, 26 Jan 2009 10:39:25 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Mon, 26 Jan 2009 10:39:25 +0000
branch
next.minor
changeset 25892
16eea80c806d
parent 25891
ebee9bab73c4
child 25893
77f655480a0f
child 25895
ab35a3dda3c5

Simplify, hoo-boy. Also don't unregister the schemes in
purple_certificate_uninit(). The schemes should be unregistered by
whoever registered them in the first place (the ssl plugins)

libpurple/certificate.c file | annotate | diff | comparison | revisions
--- a/libpurple/certificate.c	Mon Jan 26 10:38:33 2009 +0000
+++ b/libpurple/certificate.c	Mon Jan 26 10:39:25 2009 +0000
@@ -1546,31 +1546,11 @@
 void
 purple_certificate_uninit(void)
 {
-	GList *full_list, *l;
-
-	/* Unregister all Schemes */
-	full_list = g_list_copy(cert_schemes); /* Make a working copy */
-	for (l = full_list; l; l = l->next) {
-		purple_certificate_unregister_scheme(
-			(PurpleCertificateScheme *) l->data );
-	}
-	g_list_free(full_list);
-
 	/* Unregister all Verifiers */
-	full_list = g_list_copy(cert_verifiers); /* Make a working copy */
-	for (l = full_list; l; l = l->next) {
-		purple_certificate_unregister_verifier(
-			(PurpleCertificateVerifier *) l->data );
-	}
-	g_list_free(full_list);
+	g_list_foreach(cert_verifiers, (GFunc)purple_certificate_unregister_verifier, NULL);
 
 	/* Unregister all Pools */
-	full_list = g_list_copy(cert_pools); /* Make a working copy */
-	for (l = full_list; l; l = l->next) {
-		purple_certificate_unregister_pool(
-			(PurpleCertificatePool *) l->data );
-	}
-	g_list_free(full_list);
+	g_list_foreach(cert_pools, (GFunc)purple_certificate_unregister_pool, NULL);
 }
 
 gpointer

mercurial