changeset 31595:f018b3be6d2c

merge of '499902f7613784436d3ab1e47339e2822f695102' and '991beede956f49a172400a1cc3b5784f94a00fba'
author Paul Aurich <paul@darkrain42.org>
date Wed, 11 May 2011 04:35:06 +0000
parents dc1c25b81efd (current diff) 8ae190ff23c7 (diff)
children 738467beb687
files
diffstat 5 files changed, 31 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/bosh.c	Wed May 11 03:49:44 2011 +0000
+++ b/libpurple/protocols/jabber/bosh.c	Wed May 11 04:35:06 2011 +0000
@@ -484,13 +484,7 @@
 		/* Shouldn't happen; this should be the only place pipelining
 		 * is turned off.
 		 */
-#if GLIB_CHECK_VERSION(2,16,0)
 		g_warn_if_reached();
-#else
-		g_log(G_LOG_DOMAIN, G_LOG_LEVEL_WARNING,
-				"(%s:%d):%s%s code should not be reached",
-				__FILE__, __LINE__, G_STRFUNC, G_STRFUNC[0] ? ":" : "");
-#endif
 	}
 }
 
--- a/libpurple/protocols/jabber/caps.c	Wed May 11 03:49:44 2011 +0000
+++ b/libpurple/protocols/jabber/caps.c	Wed May 11 04:35:06 2011 +0000
@@ -285,34 +285,36 @@
 					 * work properly, that bug needs to be fixed in
 					 * xmlnode_from_str, not the output version... */
 					value->forms = g_list_append(value->forms, xmlnode_copy(child));
-				} else if (g_str_equal(child->name, "ext") && key->hash != NULL) {
-					purple_debug_warning("jabber", "Ignoring exts when reading new-style caps\n");
 				} else if (g_str_equal(child->name, "ext")) {
-					/* TODO: Do we care about reading in the identities listed here? */
-					const char *identifier = xmlnode_get_attrib(child, "identifier");
-					xmlnode *node;
-					GList *features = NULL;
+					if (key->hash != NULL)
+						purple_debug_warning("jabber", "Ignoring exts when reading new-style caps\n");
+					else {
+						/* TODO: Do we care about reading in the identities listed here? */
+						const char *identifier = xmlnode_get_attrib(child, "identifier");
+						xmlnode *node;
+						GList *features = NULL;
 
-					if (!identifier)
-						continue;
-
-					for (node = child->child; node; node = node->next) {
-						if (node->type != XMLNODE_TYPE_TAG)
+						if (!identifier)
 							continue;
-						if (g_str_equal(node->name, "feature")) {
-							const char *var = xmlnode_get_attrib(node, "var");
-							if (!var)
+
+						for (node = child->child; node; node = node->next) {
+							if (node->type != XMLNODE_TYPE_TAG)
 								continue;
-							features = g_list_prepend(features, g_strdup(var));
+							if (g_str_equal(node->name, "feature")) {
+								const char *var = xmlnode_get_attrib(node, "var");
+								if (!var)
+									continue;
+								features = g_list_prepend(features, g_strdup(var));
+							}
 						}
+
+						if (features) {
+							g_hash_table_insert(exts->exts, g_strdup(identifier),
+							                    features);
+						} else
+							purple_debug_warning("jabber", "Caps ext %s had no features.\n",
+							                     identifier);
 					}
-
-					if (features) {
-						g_hash_table_insert(exts->exts, g_strdup(identifier),
-						                    features);
-					} else
-						purple_debug_warning("jabber", "Caps ext %s had no features.\n",
-						                     identifier);
 				}
 			}
 
--- a/libpurple/protocols/mxit/multimx.c	Wed May 11 03:49:44 2011 +0000
+++ b/libpurple/protocols/mxit/multimx.c	Wed May 11 04:35:06 2011 +0000
@@ -169,7 +169,7 @@
 		g_free(multimx->nickname);
 
 	/* Deallocate it */
-	free (multimx);
+	g_free (multimx);
 	multimx = NULL;
 }
 
--- a/libpurple/protocols/mxit/protocol.c	Wed May 11 03:49:44 2011 +0000
+++ b/libpurple/protocols/mxit/protocol.c	Wed May 11 04:35:06 2011 +0000
@@ -2488,7 +2488,7 @@
 
 	field = g_new0( struct field, 1 );
 
-	r->fields = realloc( r->fields, sizeof( struct field* ) * ( r->fcount + 1 ) );
+	r->fields = g_realloc( r->fields, sizeof( struct field* ) * ( r->fcount + 1 ) );
 	r->fields[r->fcount] = field;
 	r->fcount++;
 
@@ -2508,7 +2508,7 @@
 
 	rec = g_new0( struct record, 1 );
 
-	p->records = realloc( p->records, sizeof( struct record* ) * ( p->rcount + 1 ) );
+	p->records = g_realloc( p->records, sizeof( struct record* ) * ( p->rcount + 1 ) );
 	p->records[p->rcount] = rec;
 	p->rcount++;
 
--- a/libpurple/protocols/silc/chat.c	Wed May 11 03:49:44 2011 +0000
+++ b/libpurple/protocols/silc/chat.c	Wed May 11 04:35:06 2011 +0000
@@ -894,9 +894,10 @@
 
 	if (components)
 		chname = g_hash_table_lookup(components, "channel");
-	if (chname)
-		channel = silc_client_get_channel(sg->client, sg->conn,
-						  (char *)chname);
+	if (!chname)
+		return NULL;
+	channel = silc_client_get_channel(sg->client, sg->conn,
+					  (char *)chname);
 	if (channel) {
 		chu = silc_client_on_channel(channel, conn->local_entry);
 		if (chu)