Mercurial > pidgin
changeset 15282:8e39ca9b954a
[gaim-migrate @ 18072]
Fixed retrieval of initial presence from jabber contacts for non-Talk accounts: We are notified of presence for contacts one we set our own presence, so wait to do so until after we've requested the roster.
committer: Tailor Script <tailor@pidgin.im>
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Thu, 04 Jan 2007 19:21:10 +0000 |
parents | 5d53e67c2512 |
children | c2f15e2117dc |
files | libgaim/protocols/jabber/disco.c libgaim/protocols/jabber/jabber.c |
diffstat | 2 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libgaim/protocols/jabber/disco.c Thu Jan 04 17:11:48 2007 +0000 +++ b/libgaim/protocols/jabber/disco.c Thu Jan 04 19:21:10 2007 +0000 @@ -27,6 +27,7 @@ #include "iq.h" #include "disco.h" #include "jabber.h" +#include "presence.h" #include "roster.h" struct _jabber_disco_info_cb_data { @@ -215,6 +216,8 @@ static void jabber_disco_server_info_result_cb(JabberStream *js, xmlnode *packet, gpointer data) { + GaimPresence *gpresence; + GaimStatus *status; xmlnode *query, *child; const char *from = xmlnode_get_attrib(packet, "from"); const char *type = xmlnode_get_attrib(packet, "type"); @@ -270,6 +273,10 @@ if (!(js->server_caps & JABBER_CAP_GOOGLE_ROSTER)) jabber_roster_request(js); + + gpresence = gaim_account_get_presence(js->gc->account); + status = gaim_presence_get_active_status(gpresence); + jabber_presence_send(js->gc->account, status); } static void
--- a/libgaim/protocols/jabber/jabber.c Thu Jan 04 17:11:48 2007 +0000 +++ b/libgaim/protocols/jabber/jabber.c Thu Jan 04 19:21:10 2007 +0000 @@ -1008,9 +1008,6 @@ void jabber_stream_set_state(JabberStream *js, JabberStreamState state) { - GaimPresence *gpresence; - GaimStatus *status; - js->state = state; switch(state) { case JABBER_STREAM_OFFLINE: @@ -1042,9 +1039,6 @@ break; case JABBER_STREAM_CONNECTED: - gpresence = gaim_account_get_presence(js->gc->account); - status = gaim_presence_get_active_status(gpresence); - jabber_presence_send(js->gc->account, status); gaim_connection_set_state(js->gc, GAIM_CONNECTED); jabber_disco_items_server(js); break;