Mercurial > pidgin.yaz
changeset 28131:478a3866ea90
jabber: Stop fall-through on connection error.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sat, 01 Aug 2009 21:45:24 +0000 |
parents | 7a61ed46f632 |
children | eb2d17945ce3 |
files | libpurple/protocols/jabber/jabber.c |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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);