changeset 6004:3b4f94adc7d4

[gaim-migrate @ 6452] another segfault fix, and some compile warning cleanups committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Thu, 03 Jul 2003 21:21:34 +0000
parents 0ca618645cec
children 81869466b6a7
files src/protocols/jabber/jabber.c
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/jabber/jabber.c	Thu Jul 03 18:27:22 2003 +0000
+++ b/src/protocols/jabber/jabber.c	Thu Jul 03 21:21:34 2003 +0000
@@ -669,7 +669,6 @@
 #else
 	if ((len = recv(gjc->fd, buf, sizeof(buf) - 1, 0)) > 0) {
 #endif
-		struct jabber_data *jd = GJ_GC(gjc)->proto_data;
 		buf[len] = '\0';
 		gaim_debug(GAIM_DEBUG_MISC, "jabber",
 				   "input (len %d): %s\n", len, buf);
@@ -1919,7 +1918,6 @@
 		xmlnode xerr;
 		char *errmsg = NULL;
 		int errcode = 0;
-		struct jabber_data *jd = GJ_GC(gjc)->proto_data;
 
 		gaim_debug(GAIM_DEBUG_ERROR, "jabber", "auth failed\n");
 		xerr = xmlnode_get_tag(p->x, "error");
@@ -2228,7 +2226,7 @@
 			querynode = xmlnode_get_tag(p->x, "query");
 			from = xmlnode_get_attrib(p->x, "from");
 			to = xmlnode_get_attrib(p->x, "to");
-			if (NSCHECK(querynode, "jabber:iq:roster") && !strcmp(from, to)) {
+			if (NSCHECK(querynode, "jabber:iq:roster") && (!from || !strcmp(from, to))) {
 				jabber_handlebuddy(gjc, xmlnode_get_firstchild(querynode));
 			} else if(NSCHECK(querynode, "jabber:iq:oob")) {
 				jabber_handleoob(gjc, p->x);
@@ -4176,7 +4174,6 @@
 		xmlnode xerr;
 		char *errmsg = NULL;
 		int errcode = 0;
-		struct jabber_data *jd = GJ_GC(gjc)->proto_data;
 
 		gaim_debug(GAIM_DEBUG_ERROR, "jabber", "registration failed\n");
 		xerr = xmlnode_get_tag(p->x, "error");