Mercurial > pidgin
changeset 28765:edf0aa0e55cb
jabber: Fix Google connecting. I wish this weren't off on its own, all sad and lonely.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sun, 06 Dec 2009 04:31:39 +0000 |
parents | 72bce773b640 |
children | 4e9a36bdda0f 172a37a43a30 7f1da2fbe7fc |
files | libpurple/protocols/jabber/google.c |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/google.c Sun Dec 06 04:19:06 2009 +0000 +++ b/libpurple/protocols/jabber/google.c Sun Dec 06 04:31:39 2009 +0000 @@ -30,6 +30,7 @@ #include "google.h" #include "jabber.h" #include "presence.h" +#include "roster.h" #include "iq.h" #include "chat.h" @@ -949,6 +950,18 @@ jabber_iq_send(iq); } +static void +roster_init_cb(JabberStream *js, const char *from, JabberIqType type, + const char *id, xmlnode *packet, gpointer data) +{ + xmlnode *query = xmlnode_get_child(packet, "query"); + + if (type == JABBER_IQ_RESULT && query) + jabber_roster_parse(js, from, type, id, query); + + jabber_stream_set_state(js, JABBER_STREAM_CONNECTED); +} + void jabber_google_roster_init(JabberStream *js) { JabberIq *iq; @@ -960,6 +973,7 @@ xmlnode_set_attrib(query, "xmlns:gr", "google:roster"); xmlnode_set_attrib(query, "gr:ext", "2"); + jabber_iq_set_callback(iq, roster_init_cb, NULL); jabber_iq_send(iq); }