# HG changeset patch # User Paul Aurich # Date 1260073899 0 # Node ID edf0aa0e55cbf1d27aad671c813d01e7f135b94d # Parent 72bce773b6400fff2ffe86607d9458c23a7bdfca jabber: Fix Google connecting. I wish this weren't off on its own, all sad and lonely. diff -r 72bce773b640 -r edf0aa0e55cb libpurple/protocols/jabber/google.c --- 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); }