# HG changeset patch # User Paul Aurich # Date 1249163124 0 # Node ID 478a3866ea90675c37e0975e79111d71750c0ea9 # Parent 7a61ed46f632ea2a45dfa5f672267f36c329b73d jabber: Stop fall-through on connection error. diff -r 7a61ed46f632 -r 478a3866ea90 libpurple/protocols/jabber/jabber.c --- a/libpurple/protocols/jabber/jabber.c Sat Aug 01 18:55:27 2009 +0000 +++ b/libpurple/protocols/jabber/jabber.c Sat Aug 01 21:45:24 2009 +0000 @@ -132,14 +132,20 @@ xmlnode *jid; char *full_jid; if((jid = xmlnode_get_child(bind, "jid")) && (full_jid = xmlnode_get_data(jid))) { - JabberBuddy *my_jb = NULL; + JabberBuddy *my_jb; jabber_id_free(js->user); - if(!(js->user = jabber_id_new(full_jid))) { + + js->user = jabber_id_new(full_jid); + if (js->user == NULL) { purple_connection_error_reason(js->gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, _("Invalid response from server")); + g_free(full_jid); + return; } - if((my_jb = jabber_buddy_find(js, full_jid, TRUE))) + + my_jb = jabber_buddy_find(js, full_jid, TRUE); + if (my_jb) my_jb->subscription |= JABBER_SUB_BOTH; purple_connection_set_display_name(js->gc, full_jid);