comparison libpurple/protocols/oscar/oscar.c @ 26852:0b97f73fa3d2

correctly NULL terminate all the arrays since that's what gtknotify assumes, also fixed a memory leak in gmail notification
author Ka-Hing Cheung <khc@hxbc.us>
date Sun, 10 May 2009 22:06:08 +0000
parents 0e99b80b54c6
children 9612a2e8db87
comparison
equal deleted inserted replaced
26850:04af21d4be27 26852:0b97f73fa3d2
3569 if (account != NULL && emailinfo != NULL && emailinfo->unread && havenewmail) { 3569 if (account != NULL && emailinfo != NULL && emailinfo->unread && havenewmail) {
3570 gchar *to = g_strdup_printf("%s%s%s", 3570 gchar *to = g_strdup_printf("%s%s%s",
3571 purple_account_get_username(account), 3571 purple_account_get_username(account),
3572 emailinfo->domain ? "@" : "", 3572 emailinfo->domain ? "@" : "",
3573 emailinfo->domain ? emailinfo->domain : ""); 3573 emailinfo->domain ? emailinfo->domain : "");
3574 const char *tos[2] = { to };
3575 const char *urls[2] = { emailinfo->url };
3574 purple_notify_emails(gc, emailinfo->nummsgs, FALSE, NULL, NULL, 3576 purple_notify_emails(gc, emailinfo->nummsgs, FALSE, NULL, NULL,
3575 (const char **)&to, (const char **)&emailinfo->url, NULL, NULL); 3577 tos, urls, NULL, NULL);
3576 g_free(to); 3578 g_free(to);
3577 } 3579 }
3578 3580
3579 if (alertitle) 3581 if (alertitle)
3580 purple_debug_misc("oscar", "Got an alert '%s' %s\n", alertitle, alerturl ? alerturl : ""); 3582 purple_debug_misc("oscar", "Got an alert '%s' %s\n", alertitle, alerturl ? alerturl : "");