comparison libpurple/protocols/jabber/google.c @ 21220:b1fa7765ca4b

propagate from branch 'im.pidgin.pidgin' (head d42511319051bcfa8adb3ed8e3f11a26cabc43f4) to branch 'next.minor' (head 3526bc084159c5c57e580e9e9e190b6ff502fdbe)
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 12 Oct 2007 02:18:35 +0000
parents 5f829728a1a5 be363a3c618f
children 1853d9d0cc65
comparison
equal deleted inserted replaced
21219:5f829728a1a5 21220:b1fa7765ca4b
108 * url = xmlnode_get_attrib(message, "url"); 108 * url = xmlnode_get_attrib(message, "url");
109 */ 109 */
110 tos[i] = (to_name != NULL ? to_name : ""); 110 tos[i] = (to_name != NULL ? to_name : "");
111 froms[i] = (from != NULL ? from : ""); 111 froms[i] = (from != NULL ? from : "");
112 subjects[i] = (subject != NULL ? subject : g_strdup("")); 112 subjects[i] = (subject != NULL ? subject : g_strdup(""));
113 urls[i] = (url != NULL ? url : ""); 113 urls[i] = url;
114 114
115 tid = xmlnode_get_attrib(message, "tid"); 115 tid = xmlnode_get_attrib(message, "tid");
116 if (tid && 116 if (tid &&
117 (js->gmail_last_tid == NULL || strcmp(tid, js->gmail_last_tid) > 0)) { 117 (js->gmail_last_tid == NULL || strcmp(tid, js->gmail_last_tid) > 0)) {
118 g_free(js->gmail_last_tid); 118 g_free(js->gmail_last_tid);
229 PurpleAccount *account = purple_connection_get_account(js->gc); 229 PurpleAccount *account = purple_connection_get_account(js->gc);
230 GSList *list = account->deny; 230 GSList *list = account->deny;
231 const char *jid = xmlnode_get_attrib(item, "jid"); 231 const char *jid = xmlnode_get_attrib(item, "jid");
232 gboolean on_block_list = FALSE; 232 gboolean on_block_list = FALSE;
233 233
234 char *jid_norm = g_strdup(jabber_normalize(account, jid)); 234 char *jid_norm;
235 235
236 const char *grt = xmlnode_get_attrib_with_namespace(item, "t", "google:roster"); 236 const char *grt = xmlnode_get_attrib_with_namespace(item, "t", "google:roster");
237 const char *subscription = xmlnode_get_attrib(item, "subscription"); 237 const char *subscription = xmlnode_get_attrib(item, "subscription");
238 238
239 if (!subscription || !strcmp(subscription, "none")) { 239 if (!subscription || !strcmp(subscription, "none")) {
240 /* The Google Talk servers will automatically add people from your Gmail address book 240 /* The Google Talk servers will automatically add people from your Gmail address book
241 * with subscription=none. If we see someone with subscription=none, ignore them. 241 * with subscription=none. If we see someone with subscription=none, ignore them.
242 */ 242 */
243 return FALSE; 243 return FALSE;
244 } 244 }
245
246 jid_norm = g_strdup(jabber_normalize(account, jid));
245 247
246 while (list) { 248 while (list) {
247 if (!strcmp(jid_norm, (char*)list->data)) { 249 if (!strcmp(jid_norm, (char*)list->data)) {
248 on_block_list = TRUE; 250 on_block_list = TRUE;
249 break; 251 break;