changeset 7813:8bba34c04c9d

[gaim-migrate @ 8460] oh yeah, I wasn't done committing stuff committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Mon, 08 Dec 2003 23:59:03 +0000
parents 02cb9284782e
children f23a7bc0de77
files src/protocols/jabber/auth.c src/protocols/jabber/presence.c
diffstat 2 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/jabber/auth.c	Mon Dec 08 23:51:06 2003 +0000
+++ b/src/protocols/jabber/auth.c	Mon Dec 08 23:59:03 2003 +0000
@@ -150,6 +150,7 @@
 	const char *pw = gaim_account_get_password(js->gc->account);
 
 	if(!type) {
+		gaim_connection_error(js->gc, _("Invalid response from server"));
 		return;
 	} else if(!strcmp(type, "error")) {
 		/* XXX: still need to handle XMPP-style errors */
--- a/src/protocols/jabber/presence.c	Mon Dec 08 23:51:06 2003 +0000
+++ b/src/protocols/jabber/presence.c	Mon Dec 08 23:59:03 2003 +0000
@@ -162,7 +162,7 @@
 		jb->error_msg = NULL;
 	}
 
-	if(type && !strcasecmp(type, "error")) {
+	if(type && !strcmp(type, "error")) {
 		const char *code = NULL;
 		char *err_txt = NULL;
 
@@ -177,7 +177,7 @@
 				_("Unknown Error in presence"));
 		if(err_txt)
 			g_free(err_txt);
-	} else if(type && !strcasecmp(type, "subscribe")) {
+	} else if(type && !strcmp(type, "subscribe")) {
 		struct _jabber_add_permit *jap = g_new0(struct _jabber_add_permit, 1);
 		char *msg = g_strdup_printf(_("The user %s wants to add you to their buddy list."), from);
 		jap->gc = js->gc;
@@ -188,8 +188,7 @@
 				_("Deny"), G_CALLBACK(deny_add_cb));
 		g_free(msg);
 		return;
-	} else if(type && (!strcmp(type, "subscribed") ||
-				!strcmp(type, "unsubscribed"))) {
+	} else if(type && !strcmp(type, "subscribed")) {
 		/* we've been allowed to see their presence, but we don't care */
 		return;
 	} else {
@@ -311,7 +310,7 @@
 			chat->conv = serv_got_joined_chat(js->gc, chat->id, room_jid);
 		}
 
-		if(type && !strcasecmp(type, "unavailable")) {
+		if(type && !strcmp(type, "unavailable")) {
 			if(!strcmp(jid->resource, chat->nick)) {
 				serv_got_chat_left(js->gc, chat->id);
 				jabber_chat_destroy(chat);
@@ -344,7 +343,8 @@
 		}
 
 		if(state == JABBER_STATE_ERROR ||
-				(type && !strcasecmp(type, "unavailable"))) {
+				(type && (!strcmp(type, "unavailable") ||
+						  !strcmp(type, "unsubscribed")))) {
 			jabber_buddy_remove_resource(jb, jid->resource);
 		} else {
 			jabber_buddy_track_resource(jb, jid->resource, priority, state,