changeset 21538:4e5bef6c3379

Fix #3669
author Daniel Atallah <daniel.atallah@gmail.com>
date Fri, 16 Nov 2007 02:41:37 +0000
parents 9dbf38f270da
children 220ea7ed4857
files libpurple/protocols/jabber/jabber.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Fri Nov 16 01:59:59 2007 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Fri Nov 16 02:41:37 2007 +0000
@@ -60,7 +60,7 @@
 #define JABBER_CONNECT_STEPS (js->gsc ? 9 : 5)
 
 static PurplePlugin *my_protocol = NULL;
-GList *jabber_features;
+GList *jabber_features = NULL;
 
 static void jabber_unregister_account_cb(JabberStream *js);
 
@@ -209,11 +209,11 @@
 		jabber_message_parse(js, *packet);
 	} else if(!strcmp((*packet)->name, "stream:features")) {
 		jabber_stream_features_parse(js, *packet);
-	} else if (!strcmp((*packet)->name, "features") &&
+	} else if (!strcmp((*packet)->name, "features") && xmlns &&
 		   !strcmp(xmlns, "http://etherx.jabber.org/streams")) {
 		jabber_stream_features_parse(js, *packet);
 	} else if(!strcmp((*packet)->name, "stream:error") ||
-			 (!strcmp((*packet)->name, "error") &&
+			 (!strcmp((*packet)->name, "error") && xmlns &&
 				!strcmp(xmlns, "http://etherx.jabber.org/streams")))
 	{
 		jabber_stream_handle_error(js, *packet);
@@ -1384,7 +1384,7 @@
 			g_free(feat->namespace);
 			
 			g_free(feature->data);
-			feature = g_list_delete_link(feature, feature);
+			jabber_features = g_list_delete_link(jabber_features, feature);
 			break;
 		}
 	}