From: <dat...@us...> - 2006-09-06 02:08:19
|
Revision: 17173 http://svn.sourceforge.net/gaim/?rev=17173&view=rev Author: datallah Date: 2006-09-05 19:08:15 -0700 (Tue, 05 Sep 2006) Log Message: ----------- Fix Bug #153721 - Crash caused by non-UTF8 text passed to g_markup_escape_text(). I suspect there may be elsewhere in the gg prpl that suffers from the same problem, but I don't want to be willy-nilly running utf8 validation everyere. Modified Paths: -------------- trunk/libgaim/protocols/gg/gg.c Modified: trunk/libgaim/protocols/gg/gg.c =================================================================== --- trunk/libgaim/protocols/gg/gg.c 2006-09-06 00:46:00 UTC (rev 17172) +++ trunk/libgaim/protocols/gg/gg.c 2006-09-06 02:08:15 UTC (rev 17173) @@ -1547,7 +1547,7 @@ return text; } else { - tmp = g_strdup(gaim_status_get_name(status)); + tmp = gaim_utf8_salvage(gaim_status_get_name(status)); text = g_markup_escape_text(tmp, -1); g_free(tmp); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-09-06 03:12:08
|
Revision: 17176 http://svn.sourceforge.net/gaim/?rev=17176&view=rev Author: datallah Date: 2006-09-05 20:12:05 -0700 (Tue, 05 Sep 2006) Log Message: ----------- Fix bug #1553112 (printf("%s", NULL) stuff) Modified Paths: -------------- trunk/libgaim/protocols/gg/gg.c Modified: trunk/libgaim/protocols/gg/gg.c =================================================================== --- trunk/libgaim/protocols/gg/gg.c 2006-09-06 03:01:57 UTC (rev 17175) +++ trunk/libgaim/protocols/gg/gg.c 2006-09-06 03:12:05 UTC (rev 17176) @@ -1324,7 +1324,7 @@ gaim_debug_info("gg", "notify: (%d) status: %d; descr: %s\n", - n->uin, n->status, descr); + n->uin, n->status, descr ? descr : "(null)"); ggp_generic_status_handler(gc, n->uin, n->status, descr); @@ -1335,7 +1335,8 @@ gaim_debug_info("gg", "notify60_pre: (%d) status=%d; version=%d; descr=%s\n", ev->event.notify60->uin, ev->event.notify60->status, - ev->event.notify60->version, ev->event.notify60->descr); + ev->event.notify60->version, + ev->event.notify60->descr ? ev->event.notify60->descr : "(null)"); for (i = 0; ev->event.notify60[i].uin; i++) { gaim_debug_info("gg", @@ -1343,7 +1344,7 @@ ev->event.notify60[i].uin, ev->event.notify60[i].status, ev->event.notify60[i].version, - ev->event.notify60[i].descr); + ev->event.notify60[i].descr ? ev->event.notify60[i].descr : "(null)"); ggp_generic_status_handler(gc, ev->event.notify60[i].uin, ev->event.notify60[i].status, @@ -1353,7 +1354,7 @@ case GG_EVENT_STATUS: gaim_debug_info("gg", "status: (%d) status=%d; descr=%s\n", ev->event.status.uin, ev->event.status.status, - ev->event.status.descr); + ev->event.status.descr ? ev->event.status.descr : "(null)"); ggp_generic_status_handler(gc, ev->event.status.uin, ev->event.status.status, ev->event.status.descr); @@ -1362,7 +1363,8 @@ gaim_debug_info("gg", "status60: (%d) status=%d; version=%d; descr=%s\n", ev->event.status60.uin, ev->event.status60.status, - ev->event.status60.version, ev->event.status60.descr); + ev->event.status60.version, + ev->event.status60.descr ? ev->event.status60.descr : "(null)"); ggp_generic_status_handler(gc, ev->event.status60.uin, ev->event.status60.status, ev->event.status60.descr); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2006-11-09 22:29:26
|
Revision: 17715 http://svn.sourceforge.net/gaim/?rev=17715&view=rev Author: boler Date: 2006-11-09 14:28:56 -0800 (Thu, 09 Nov 2006) Log Message: ----------- gg: Don't display additional status line if buddy is offline. Modified Paths: -------------- trunk/libgaim/protocols/gg/gg.c Modified: trunk/libgaim/protocols/gg/gg.c =================================================================== --- trunk/libgaim/protocols/gg/gg.c 2006-11-09 20:21:13 UTC (rev 17714) +++ trunk/libgaim/protocols/gg/gg.c 2006-11-09 22:28:56 UTC (rev 17715) @@ -1565,6 +1565,12 @@ char *text; const char *msg, *name; + g_return_if_fail(b != NULL); + + if (!GAIM_BUDDY_IS_ONLINE(b)) { + return; + } + status = gaim_presence_get_active_status(gaim_buddy_get_presence(b)); msg = gaim_status_get_attr_string(status, "message"); name = gaim_status_get_name(status); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2006-12-08 07:41:03
|
Revision: 17920 http://svn.sourceforge.net/gaim/?rev=17920&view=rev Author: boler Date: 2006-12-07 15:16:04 -0800 (Thu, 07 Dec 2006) Log Message: ----------- gg: Display status message of offline buddies. Modified Paths: -------------- trunk/libgaim/protocols/gg/gg.c Modified: trunk/libgaim/protocols/gg/gg.c =================================================================== --- trunk/libgaim/protocols/gg/gg.c 2006-12-07 18:54:17 UTC (rev 17919) +++ trunk/libgaim/protocols/gg/gg.c 2006-12-07 23:16:04 UTC (rev 17920) @@ -1567,20 +1567,21 @@ g_return_if_fail(b != NULL); - if (!GAIM_BUDDY_IS_ONLINE(b)) { - return; - } - status = gaim_presence_get_active_status(gaim_buddy_get_presence(b)); msg = gaim_status_get_attr_string(status, "message"); name = gaim_status_get_name(status); if (msg != NULL) { text = g_markup_escape_text(msg, -1); - g_string_append_printf(str, "\n<b>%s:</b> %s: %s", - _("Status"), name, text); + if (GAIM_BUDDY_IS_ONLINE(b)) { + g_string_append_printf(str, "\n<b>%s:</b> %s: %s", + _("Status"), name, text); + } else { + g_string_append_printf(str, "\n<b>%s:</b>: %s", + _("Message"), text); + } g_free(text); - } else { + } else if (GAIM_BUDDY_IS_ONLINE(b)) { g_string_append_printf(str, "\n<b>%s:</b> %s", _("Status"), name); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2006-12-10 23:33:05
|
Revision: 17951 http://svn.sourceforge.net/gaim/?rev=17951&view=rev Author: boler Date: 2006-12-10 15:33:03 -0800 (Sun, 10 Dec 2006) Log Message: ----------- gg: Don't duplicate "Status: Offline" message. This got broken by recent changes to Notify User Info. Modified Paths: -------------- trunk/libgaim/protocols/gg/gg.c Modified: trunk/libgaim/protocols/gg/gg.c =================================================================== --- trunk/libgaim/protocols/gg/gg.c 2006-12-10 23:32:28 UTC (rev 17950) +++ trunk/libgaim/protocols/gg/gg.c 2006-12-10 23:33:03 UTC (rev 17951) @@ -1572,7 +1572,8 @@ gaim_notify_user_info_add_pair(user_info, _("Message"), text); } g_free(text); - } else { + /* We don't want to duplicate 'Status: Offline'. */ + } else if (GAIM_BUDDY_IS_ONLINE(b)) { gaim_notify_user_info_add_pair(user_info, _("Status"), name); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2006-12-17 12:59:07
|
Revision: 18015 http://svn.sourceforge.net/gaim/?rev=18015&view=rev Author: boler Date: 2006-12-17 04:59:04 -0800 (Sun, 17 Dec 2006) Log Message: ----------- gg: Don't send messages exceeding GG_MSG_MAXSIZE. (Fixes #1614894) Modified Paths: -------------- trunk/libgaim/protocols/gg/gg.c Modified: trunk/libgaim/protocols/gg/gg.c =================================================================== --- trunk/libgaim/protocols/gg/gg.c 2006-12-17 08:06:48 UTC (rev 18014) +++ trunk/libgaim/protocols/gg/gg.c 2006-12-17 12:59:04 UTC (rev 18015) @@ -1761,24 +1761,31 @@ { GGPInfo *info = gc->proto_data; char *tmp, *plain; + int ret = 0; - if (strlen(msg) == 0) - return 1; + if (strlen(msg) == 0) { + return 0; + } + gaim_debug_info("gg", "ggp_send_im: msg = %s\n", msg); plain = gaim_unescape_html(msg); - gaim_debug_info("gg", "ggp_send_im: msg = %s\n", msg); tmp = charset_convert(plain, "UTF-8", "CP1250"); - g_free(plain); - if (tmp != NULL && strlen(tmp) > 0) { - if (gg_send_message(info->session, GG_CLASS_CHAT, + if (NULL == tmp || strlen(tmp) == 0) { + ret = 0; + } else if (strlen(tmp) > GG_MSG_MAXSIZE) { + ret = -E2BIG; + } else if (gg_send_message(info->session, GG_CLASS_CHAT, ggp_str_to_uin(who), (unsigned char *)tmp) < 0) { - return -1; - } + ret = -1; + } else { + ret = 1; } + + g_free(plain); g_free(tmp); - return 1; + return ret; } /* }}} */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2006-12-17 21:12:31
|
Revision: 18019 http://svn.sourceforge.net/gaim/?rev=18019&view=rev Author: boler Date: 2006-12-17 13:12:18 -0800 (Sun, 17 Dec 2006) Log Message: ----------- gg: Fixed double free() in ggp_pubdir_handle_info(). Modified Paths: -------------- trunk/libgaim/protocols/gg/gg.c Modified: trunk/libgaim/protocols/gg/gg.c =================================================================== --- trunk/libgaim/protocols/gg/gg.c 2006-12-17 20:14:41 UTC (rev 18018) +++ trunk/libgaim/protocols/gg/gg.c 2006-12-17 21:12:18 UTC (rev 18019) @@ -1046,13 +1046,11 @@ val = ggp_buddy_get_name(gc, ggp_str_to_uin(who)); g_free(who); - who = val; /* val = gaim_strdup_withhtml(text->str); */ - gaim_notify_userinfo(gc, who, user_info, ggp_sr_close_cb, form); + gaim_notify_userinfo(gc, val, user_info, ggp_sr_close_cb, form); g_free(val); - g_free(who); gaim_notify_user_info_destroy(user_info); } /* }}} */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2006-12-19 00:09:38
|
Revision: 18022 http://svn.sourceforge.net/gaim/?rev=18022&view=rev Author: boler Date: 2006-12-18 16:09:38 -0800 (Mon, 18 Dec 2006) Log Message: ----------- gg: Include status message in "Get Info" output. Modified Paths: -------------- trunk/libgaim/protocols/gg/gg.c Modified: trunk/libgaim/protocols/gg/gg.c =================================================================== --- trunk/libgaim/protocols/gg/gg.c 2006-12-18 20:29:45 UTC (rev 18021) +++ trunk/libgaim/protocols/gg/gg.c 2006-12-19 00:09:38 UTC (rev 18022) @@ -1014,6 +1014,7 @@ GGPSearchForm *form) { GaimNotifyUserInfo *user_info; + GaimBuddy *buddy; char *val, *who; user_info = gaim_notify_user_info_new(); @@ -1044,13 +1045,29 @@ } g_free(val); - val = ggp_buddy_get_name(gc, ggp_str_to_uin(who)); - g_free(who); + /* + * Include a status message, if exists and buddy is in the blist. + */ + buddy = gaim_find_buddy(gaim_connection_get_account(gc), who); + if (NULL != buddy) { + GaimStatus *status; + const char *msg; + char *text; -/* val = gaim_strdup_withhtml(text->str); */ + status = gaim_presence_get_active_status(gaim_buddy_get_presence(buddy)); + msg = gaim_status_get_attr_string(status, "message"); + if (msg != NULL) { + text = g_markup_escape_text(msg, -1); + gaim_notify_user_info_add_pair(user_info, _("Message"), text); + g_free(text); + } + } + + val = ggp_buddy_get_name(gc, ggp_str_to_uin(who)); gaim_notify_userinfo(gc, val, user_info, ggp_sr_close_cb, form); g_free(val); + g_free(who); gaim_notify_user_info_destroy(user_info); } /* }}} */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |