# HG changeset patch # User Nathan Walp # Date 1070507999 0 # Node ID 01eb54bb41dc914d69b940589d28f24719dbf0d4 # Parent 2ffb337be055c1dd291dd27193a5c2de3d9b088d [gaim-migrate @ 8375] jabber updates committer: Tailor Script diff -r 2ffb337be055 -r 01eb54bb41dc src/protocols/jabber/auth.c --- a/src/protocols/jabber/auth.c Wed Dec 03 17:29:48 2003 +0000 +++ b/src/protocols/jabber/auth.c Thu Dec 04 03:19:59 2003 +0000 @@ -111,14 +111,18 @@ { const char *type = xmlnode_get_attrib(packet, "type"); - if(type && !strcmp(type, "error")) { + if(type && !strcmp(type, "result")) { + jabber_stream_set_state(js, JABBER_STREAM_CONNECTED); + } else { xmlnode *error = xmlnode_get_child(packet, "error"); - const char *err_code; - char *err_text; + const char *err_code = NULL; + char *err_text = NULL; char *buf; - err_code = xmlnode_get_attrib(error, "code"); - err_text = xmlnode_get_data(error); + if(error) { + err_code = xmlnode_get_attrib(error, "code"); + err_text = xmlnode_get_data(error); + } if(!err_code) err_code = ""; @@ -135,7 +139,6 @@ g_free(err_text); g_free(buf); } - jabber_stream_set_state(js, JABBER_STREAM_CONNECTED); } static void auth_old_cb(JabberStream *js, xmlnode *packet, gpointer data)