changeset 19726:2643bd295495

merge of 'c33ce721c01032386277454ea2455c2f3638b771' and 'cd2e4c612c93b63069e390c940ffd46548ee067c'
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 11 Sep 2007 00:15:28 +0000
parents b2d213681176 (current diff) 36d5d5048b53 (diff)
children 64e0c7fa92c9
files
diffstat 3 files changed, 17 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/buddy.c	Mon Sep 10 23:19:34 2007 +0000
+++ b/libpurple/protocols/jabber/buddy.c	Tue Sep 11 00:15:28 2007 +0000
@@ -799,6 +799,12 @@
 				purple_notify_user_info_add_pair(user_info, _("Operating System"), jbr->client.os);
 			}
 		}
+#if 0 
+		/* #if 0 this for now; I think this would be far more useful if we limited this to a particular set of features
+ 		 * of particular interest (-vv jumps out as one). As it is now, I don't picture people getting all excited: "Oh sweet crap!
+ 		 * So-and-so supports 'jabber:x:data' AND 'Collaborative Data Objects'!"
+ 		 */
+
 		if(jbr && jbr->caps) {
 			GString *tmp = g_string_new("");
 			GList *iter;
@@ -907,15 +913,16 @@
 					feature = _("Hop Check");
 				else if(g_str_has_suffix(feature, "+notify"))
 					feature = NULL;
-				
 				if(feature)
-					g_string_append_printf(tmp, "%s\n", feature);
+					g_string_append_printf(tmp, "%s<br/>", feature);
 			}
+
 			if(strlen(tmp->str) > 0)
 				purple_notify_user_info_add_pair(user_info, _("Capabilities"), tmp->str);
 			
 			g_string_free(tmp, TRUE);
 		}
+#endif
 	} else {
 		for(resources = jbi->jb->resources; resources; resources = resources->next) {
 			char *purdy = NULL;
@@ -957,6 +964,7 @@
 					purple_notify_user_info_add_pair(user_info, _("Operating System"), jbr->client.os);
 				}
 			}
+#if 0
 			if(jbr && jbr->caps) {
 				GString *tmp = g_string_new("");
 				GList *iter;
@@ -1074,6 +1082,7 @@
 				
 				g_string_free(tmp, TRUE);
 			}
+#endif
 		}
 	}
 
--- a/libpurple/protocols/jabber/caps.c	Mon Sep 10 23:19:34 2007 +0000
+++ b/libpurple/protocols/jabber/caps.c	Tue Sep 11 00:15:28 2007 +0000
@@ -474,13 +474,13 @@
 	userdata->ver = g_strdup(ver);
 
 	if(originalext) {
-		gchar **tmp;
+		int i;
 		gchar **splat = g_strsplit(originalext, " ", 0);
-		for(tmp = splat; *tmp; tmp++) {
-			userdata->ext = g_list_append(userdata->ext, tmp);
+		for(i =0; splat[i]; i++) {
+			userdata->ext = g_list_append(userdata->ext, g_strdup(splat[i]));
 			++userdata->extOutstanding;
 		}
-		g_free(splat);
+		g_strfreev(splat);
 	}
 	g_free(originalext);
 	
--- a/libpurple/protocols/jabber/jabber.c	Mon Sep 10 23:19:34 2007 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Tue Sep 11 00:15:28 2007 +0000
@@ -1427,6 +1427,7 @@
 		JabberBuddyResource *jbr = NULL;
 		const char *sub;
 		GList *l;
+		const char *mood;
 
 		if (full) {
 			PurpleStatus *status;
@@ -1452,8 +1453,7 @@
 			
 			status = purple_presence_get_active_status(purple_buddy_get_presence(b));
 			value = purple_status_get_attr_value(status, "mood");
-			if(value && purple_value_get_type(value) == PURPLE_TYPE_STRING) {
-				const char *mood = purple_value_get_string(value);
+			if (value && purple_value_get_type(value) == PURPLE_TYPE_STRING && (mood = purple_value_get_string(value))) {
 				
 				value = purple_status_get_attr_value(status, "moodtext");
 				if(value && purple_value_get_type(value) == PURPLE_TYPE_STRING) {