pidgin: 7f87d4b5: gadu-gadu: (NULL)-like descriptions and ...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Tue Apr 13 02:12:41 EDT 2010
-----------------------------------------------------------------
Revision: 7f87d4b5d3cc6e2b720d52df157f2e5d9ebe39ca
Ancestor: 40357e973e4e4ed5e5ff80cc4ac3af833080249b
Author: kkszysiu at gmail.com
Date: 2010-04-13T06:03:35
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/7f87d4b5d3cc6e2b720d52df157f2e5d9ebe39ca
Modified files:
libpurple/protocols/gg/gg.c
libpurple/protocols/gg/lib/events.c
libpurple/protocols/gg/lib/libgadu.c
ChangeLog:
gadu-gadu: (NULL)-like descriptions and packet size problems. Fixes #11676
-------------- next part --------------
============================================================
--- libpurple/protocols/gg/gg.c 814391d111cfd6d949f2a736e6a7b58ad5a57449
+++ libpurple/protocols/gg/gg.c 099715895f1ea1b01fc22bf23af0aaaa114c96d1
@@ -1000,7 +1000,6 @@ static void ggp_generic_status_handler(P
int status, const char *descr)
{
gchar *from;
- gchar *msg;
const char *st;
gchar *avatarurl;
PurpleUtilFetchUrlData *url_data;
@@ -1048,11 +1047,14 @@ static void ggp_generic_status_handler(P
purple_debug_info("gg", "st = %s\n", st);
//msg = charset_convert(descr, "CP1250", "UTF-8");
- msg = g_strdup_printf("%s", descr);
- purple_prpl_got_user_status(purple_connection_get_account(gc),
- from, st, "message", msg, NULL);
+ if (descr == NULL) {
+ purple_prpl_got_user_status(purple_connection_get_account(gc),
+ from, st, NULL);
+ } else {
+ purple_prpl_got_user_status(purple_connection_get_account(gc),
+ from, st, "message", descr, NULL);
+ }
g_free(from);
- g_free(msg);
}
static void ggp_sr_close_cb(gpointer user_data)
@@ -1608,12 +1610,12 @@ static void ggp_callback_recv(gpointer _
purple_debug_info("gg",
"notify60: (%d) status=%d; version=%d; descr=%s\n",
ev->event.notify60[i].uin,
- ev->event.notify60[i].status,
+ GG_S(ev->event.notify60[i].status),
ev->event.notify60[i].version,
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,
+ GG_S(ev->event.notify60[i].status),
ev->event.notify60[i].descr);
}
break;
@@ -1623,7 +1625,7 @@ static void ggp_callback_recv(gpointer _
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);
+ GG_S(ev->event.status.status), ev->event.status.descr);
break;
case GG_EVENT_STATUS60:
purple_debug_info("gg",
============================================================
--- libpurple/protocols/gg/lib/events.c cb6479253caf6df38fdbd7b648a11849a2fb9ec0
+++ libpurple/protocols/gg/lib/events.c d27f341daad16f2ff60d5389d5f7417839b05e73
@@ -1143,7 +1143,7 @@ static int gg_watch_fd_connected(struct
case GG_NOTIFY_REPLY80:
{
struct gg_notify_reply80 *n = (void*) p;
- int length = h->length, i = 0;
+ unsigned int length = h->length, i = 0;
gg_debug_session(sess, GG_DEBUG_MISC, "// gg_watch_fd_connected() received a notify reply\n");
============================================================
--- libpurple/protocols/gg/lib/libgadu.c b4de84d7b5028adcbc13e81d0dacbc27814b8f72
+++ libpurple/protocols/gg/lib/libgadu.c 8e6e5432c0349e3f498203ce8ddf08588c8696c0
@@ -412,7 +412,8 @@ void *gg_recv_packet(struct gg_session *
{
struct gg_header h;
char *buf = NULL;
- int ret = 0, offset, size = 0;
+ int ret = 0;
+ unsigned int offset, size = 0;
gg_debug_session(sess, GG_DEBUG_FUNCTION, "** gg_recv_packet(%p);\n", sess);
@@ -609,7 +610,7 @@ int gg_send_packet(struct gg_session *se
h->length = gg_fix32(tmp_length - sizeof(struct gg_header));
if ((gg_debug_level & GG_DEBUG_DUMP)) {
- int i;
+ unsigned int i;
gg_debug_session(sess, GG_DEBUG_DUMP, "// gg_send_packet(0x%.2x)", gg_fix32(h->type));
for (i = 0; i < tmp_length; ++i)
More information about the Commits
mailing list