pidgin.next.minor: a515a270: Simplify, hoo-boy. Also don't unregiste...

markdoliner at pidgin.im markdoliner at pidgin.im
Mon Jan 26 05:40:26 EST 2009


-----------------------------------------------------------------
Revision: a515a270e1782f14b92ccfef56e731de38407ac6
Ancestor: aa60091ae5c724a0c287dff08ae64eead7163d67
Author: markdoliner at pidgin.im
Date: 2009-01-26T10:39:25
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/a515a270e1782f14b92ccfef56e731de38407ac6

Modified files:
        libpurple/certificate.c

ChangeLog: 

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)

-------------- next part --------------
============================================================
--- libpurple/certificate.c	95f8b89d3f2443a1ca459df02b98a00c5125f070
+++ libpurple/certificate.c	bf3ec25d68ade46f7b87c054427c49fed1a5caee
@@ -1546,31 +1546,11 @@ purple_certificate_uninit(void)
 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


More information about the Commits mailing list