Mercurial > pidgin
comparison libpurple/protocols/jabber/google.c @ 25979:439f07ce4c8a
propagate from branch 'im.pidgin.pidgin' (head 303af74a38e7b313d4fb0be4d4054a16cb13d819)
to branch 'im.pidgin.cpw.darkrain42.xmpp.iq-handlers' (head b04e8bdc99bebce19e9d8a5df5d7397cffcf2988)
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sat, 07 Mar 2009 02:14:34 +0000 |
parents | 8aa7d8bcbc7d 050052891c55 |
children | ae41d8e827e3 |
comparison
equal
deleted
inserted
replaced
25977:0e93bbb7f5ca | 25979:439f07ce4c8a |
---|---|
142 js->gmail_last_time = g_strdup(in_str); | 142 js->gmail_last_time = g_strdup(in_str); |
143 } | 143 } |
144 } | 144 } |
145 | 145 |
146 void | 146 void |
147 jabber_gmail_poke(JabberStream *js, xmlnode *packet) | 147 jabber_gmail_poke(JabberStream *js, const char *from, JabberIqType type, |
148 { | 148 const char *id, xmlnode *new_mail) |
149 const char *type; | 149 { |
150 xmlnode *query; | 150 xmlnode *query; |
151 JabberIq *iq; | 151 JabberIq *iq; |
152 | 152 |
153 /* bail if the user isn't interested */ | 153 /* bail if the user isn't interested */ |
154 if (!purple_account_get_check_mail(js->gc->account)) | 154 if (!purple_account_get_check_mail(js->gc->account)) |
155 return; | 155 return; |
156 | 156 |
157 type = xmlnode_get_attrib(packet, "type"); | |
158 | |
159 | |
160 /* Is this an initial incoming mail notification? If so, send a request for more info */ | 157 /* Is this an initial incoming mail notification? If so, send a request for more info */ |
161 if (strcmp(type, "set") || !xmlnode_get_child(packet, "new-mail")) | 158 if (type != JABBER_IQ_SET) |
162 return; | 159 return; |
163 | 160 |
164 purple_debug(PURPLE_DEBUG_MISC, "jabber", | 161 purple_debug(PURPLE_DEBUG_MISC, "jabber", |
165 "Got new mail notification. Sending request for more info\n"); | 162 "Got new mail notification. Sending request for more info\n"); |
166 | 163 |