comparison libpurple/protocols/jabber/google.c @ 20587:45b524709475

Fix some incorrect assertions when G_DEBUG=fatal_warnings is set.
author Daniel Atallah <daniel.atallah@gmail.com>
date Fri, 21 Sep 2007 00:55:32 +0000
parents 5b35273d145f
children d41907afb521 707cd521188a
comparison
equal deleted inserted replaced
20586:04590d9db8b7 20587:45b524709475
59 59
60 /* If Gmail doesn't tell us who the mail is to, let's use our JID */ 60 /* If Gmail doesn't tell us who the mail is to, let's use our JID */
61 to = xmlnode_get_attrib(packet, "to"); 61 to = xmlnode_get_attrib(packet, "to");
62 default_tos[0] = jabber_get_bare_jid(to); 62 default_tos[0] = jabber_get_bare_jid(to);
63 63
64 if (count == 0) {
65 purple_notify_emails(js->gc, count, FALSE, NULL, NULL, (const char**) default_tos, NULL, NULL, NULL);
66 g_free(default_tos[0]);
67 return;
68 }
69
70 message = xmlnode_get_child(child, "mail-thread-info"); 64 message = xmlnode_get_child(child, "mail-thread-info");
71 if (!message) { 65
66 if (count == 0 || !message) {
72 purple_notify_emails(js->gc, count, FALSE, NULL, NULL, (const char**) default_tos, NULL, NULL, NULL); 67 purple_notify_emails(js->gc, count, FALSE, NULL, NULL, (const char**) default_tos, NULL, NULL, NULL);
73 g_free(default_tos[0]); 68 g_free(default_tos[0]);
74 return; 69 return;
75 } 70 }
76 71
125 } 120 }
126 121
127 if (i>0) 122 if (i>0)
128 purple_notify_emails(js->gc, count, count == i, (const char**) subjects, froms, tos, 123 purple_notify_emails(js->gc, count, count == i, (const char**) subjects, froms, tos,
129 urls, NULL, NULL); 124 urls, NULL, NULL);
130 else 125 else
131 purple_notify_emails(js->gc, count, FALSE, NULL, NULL, (const char**) default_tos, NULL, NULL, NULL); 126 purple_notify_emails(js->gc, count, FALSE, NULL, NULL, (const char**) default_tos, NULL, NULL, NULL);
132 127
133 128
134 g_free(to_name); 129 g_free(to_name);
135 g_free(tos); 130 g_free(tos);
255 list = list->next; 250 list = list->next;
256 } 251 }
257 252
258 if (grt && (*grt == 'H' || *grt == 'h')) { 253 if (grt && (*grt == 'H' || *grt == 'h')) {
259 PurpleBuddy *buddy = purple_find_buddy(account, jid_norm); 254 PurpleBuddy *buddy = purple_find_buddy(account, jid_norm);
260 purple_blist_remove_buddy(buddy); 255 if (buddy)
256 purple_blist_remove_buddy(buddy);
261 g_free(jid_norm); 257 g_free(jid_norm);
262 return FALSE; 258 return FALSE;
263 } 259 }
264 260
265 if (!on_block_list && (grt && (*grt == 'B' || *grt == 'b'))) { 261 if (!on_block_list && (grt && (*grt == 'B' || *grt == 'b'))) {