diff libpurple/protocols/jabber/caps.c @ 30688:116ca888e77d

jabber: Move another function out of caps.c... Sadly, this one landed in jabber.c (which needs to be split up)
author Paul Aurich <paul@darkrain42.org>
date Sat, 10 Jul 2010 02:02:21 +0000
parents 7fb775b4465b
children a8cc50c2279f
line wrap: on
line diff
--- a/libpurple/protocols/jabber/caps.c	Sat Jul 10 00:59:19 2010 +0000
+++ b/libpurple/protocols/jabber/caps.c	Sat Jul 10 02:02:21 2010 +0000
@@ -704,36 +704,6 @@
 }
 
 static gint
-jabber_identity_compare(gconstpointer a, gconstpointer b)
-{
-	const JabberIdentity *ac;
-	const JabberIdentity *bc;
-	gint cat_cmp;
-	gint typ_cmp;
-
-	ac = a;
-	bc = b;
-
-	if ((cat_cmp = strcmp(ac->category, bc->category)) == 0) {
-		if ((typ_cmp = strcmp(ac->type, bc->type)) == 0) {
-			if (!ac->lang && !bc->lang) {
-				return 0;
-			} else if (ac->lang && !bc->lang) {
-				return 1;
-			} else if (!ac->lang && bc->lang) {
-				return -1;
-			} else {
-				return strcmp(ac->lang, bc->lang);
-			}
-		} else {
-			return typ_cmp;
-		}
-	} else {
-		return cat_cmp;
-	}
-}
-
-static gint
 jabber_xdata_compare(gconstpointer a, gconstpointer b)
 {
 	const xmlnode *aformtypefield = a;
@@ -956,6 +926,10 @@
 	}
 
 	info.features = features;
+	/* TODO: This copy can go away, I think, since jabber_identities
+	 * is pre-sorted, so the sort in calculate_hash should be idempotent.
+	 * However, I want to test that. --darkrain
+	 */
 	info.identities = g_list_copy(jabber_identities);
 	info.forms = NULL;