diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-01-24 12:28:13 +1300 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2006-01-24 12:28:13 +1300 |
commit | 9fae35c9cf2d5a319623946705e5d7179ea5c338 (patch) | |
tree | c489bfe332588c4fb918b4759c3f89f8b4c0a75f /protocols/jabber/jabber.c | |
parent | 7308b63f3300d5b2a326edfde6c50a18bc05e3e5 (diff) | |
parent | 68c7c145c281fe3ae734b345bf133d70d1ef8652 (diff) |
Merge from Wilmer
Diffstat (limited to 'protocols/jabber/jabber.c')
-rw-r--r-- | protocols/jabber/jabber.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c index fc419124..ba652b8a 100644 --- a/protocols/jabber/jabber.c +++ b/protocols/jabber/jabber.c @@ -412,7 +412,7 @@ static void gjab_recv(gjconn gjc) XML_Parse(gjc->parser, buf, len, 0); if (jd->die) signoff(GJ_GC(gjc)); - } else if (len < 0 || errno != EAGAIN) { + } else if (len == 0 || (len < 0 && (!sockerr_again() || gjc->ssl))) { STATE_EVT(JCONN_STATE_OFF) } } @@ -1248,14 +1248,10 @@ static void jabber_handleauthresp(gjconn gjc, jpacket p) } gjab_auth(gjc); } else { + gjab_reqroster(gjc); account_online(GJ_GC(gjc)); - - if (bud_list_cache_exists(GJ_GC(gjc))) - do_import(GJ_GC(gjc), NULL); - + ((struct jabber_data *)GJ_GC(gjc)->proto_data)->did_import = TRUE; - - gjab_reqroster(gjc); } } else { xmlnode xerr; @@ -1859,11 +1855,7 @@ static void jabber_set_away(struct gaim_connection *gc, char *state, char *messa y = xmlnode_insert_tag(x, "show"); xmlnode_insert_cdata(y, "away", -1); y = xmlnode_insert_tag(x, "status"); - { - char *utf8 = str_to_utf8(message); - xmlnode_insert_cdata(y, utf8, -1); - g_free(utf8); - } + xmlnode_insert_cdata(y, message, -1); gc->away = ""; } else { /* Gaim wants us to not be away */ |