Mercurial > pidgin.yaz
changeset 22799:fc1e708ddf92
merge of 'dc85c2329304dd6f567820b55939193328f9e506'
and 'e0c898b6c75ee358dd659b7fde7551c304f48413'
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 03 May 2008 03:02:25 +0000 |
parents | 05cb3f04c01e (diff) 900c7b5660d5 (current diff) |
children | 67a4c8c46f78 |
files | |
diffstat | 7 files changed, 33 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/command.c Sat May 03 02:49:53 2008 +0000 +++ b/libpurple/protocols/msn/command.c Sat May 03 03:02:25 2008 +0000 @@ -121,7 +121,7 @@ /* khc: Huh! */ /*add payload Length checking*/ msn_set_payload_len(cmd); - purple_debug_info("MSNP14","get payload len:%d\n",cmd->payload_len); + purple_debug_info("MSNP14","get payload len:%" G_GSIZE_FORMAT "\n", cmd->payload_len); msn_command_ref(cmd);
--- a/libpurple/protocols/msn/msn.c Sat May 03 02:49:53 2008 +0000 +++ b/libpurple/protocols/msn/msn.c Sat May 03 03:02:25 2008 +0000 @@ -239,7 +239,7 @@ MsnUser *user; char *payload = NULL; const char *mobile_number = NULL; - size_t payload_len; + gsize payload_len; session = gc->proto_data; cmdproc = session->notification->cmdproc; @@ -254,13 +254,13 @@ mobile_number[0] == '+') { /* if msn_user_get_mobile_phone() has a + in front, it's a number that from the buddy's contact card */ - trans = msn_transaction_new(cmdproc, "PGD", "tel:%s 1 %d", + trans = msn_transaction_new(cmdproc, "PGD", "tel:%s 1 %" G_GSIZE_FORMAT, mobile_number, payload_len); } else { /* otherwise we send to whatever phone number the buddy registered with msn */ - trans = msn_transaction_new(cmdproc, "PGD", "%s 1 %d", who, - payload_len); + trans = msn_transaction_new(cmdproc, "PGD", "%s 1 %" G_GSIZE_FORMAT, + who, payload_len); } msn_transaction_set_payload(trans, payload, payload_len); @@ -2071,7 +2071,7 @@ static void msn_got_photo(PurpleUtilFetchUrlData *url_data, gpointer user_data, - const gchar *url_text, size_t len, const gchar *error_message) + const gchar *url_text, gsize len, const gchar *error_message) { MsnGetInfoStepTwoData *info2_data = (MsnGetInfoStepTwoData *)user_data; int id = -1; @@ -2113,7 +2113,7 @@ else { char buf[1024]; - purple_debug_info("msn", "%s is %d bytes\n", photo_url_text, len); + purple_debug_info("msn", "%s is %" G_GSIZE_FORMAT " bytes\n", photo_url_text, len); id = purple_imgstore_add_with_id(g_memdup(url_text, len), len, NULL); g_snprintf(buf, sizeof(buf), "<img id=\"%d\"><br>", id); purple_notify_user_info_prepend_pair(user_info, NULL, buf);
--- a/libpurple/protocols/msn/notification.c Sat May 03 02:49:53 2008 +0000 +++ b/libpurple/protocols/msn/notification.c Sat May 03 03:02:25 2008 +0000 @@ -414,7 +414,7 @@ { g_return_if_fail(cmd->payload_cb != NULL); - purple_debug_info("MSNP14","MSG payload:{%.*s}\n",cmd->payload_len, cmd->payload); + purple_debug_info("MSNP14", "MSG payload:{%.*s}\n", (guint)(cmd->payload_len), cmd->payload); cmd->payload_cb(cmdproc, cmd, cmd->payload, cmd->payload_len); } } @@ -432,10 +432,12 @@ cmdproc = session->notification->cmdproc; g_return_if_fail(msg != NULL); payload = msn_message_gen_payload(msg, &payload_len); - purple_debug_info("MSNP14","send UUM,payload{%s},strlen:%d,len:%d\n", - payload,strlen(payload),payload_len); + purple_debug_info("MSNP14", + "send UUM, payload{%s}, strlen:%" G_GSIZE_FORMAT ", len:%" G_GSIZE_FORMAT "\n", + payload, strlen(payload), payload_len); type = msg->type; - trans = msn_transaction_new(cmdproc, "UUM","%s 32 %d %d",msg->remote_user,type,payload_len); + trans = msn_transaction_new(cmdproc, "UUM", "%s 32 %d %" G_GSIZE_FORMAT, + msg->remote_user, type, payload_len); msn_transaction_set_payload(trans, payload, strlen(payload)); msn_cmdproc_send_trans(cmdproc, trans); } @@ -449,7 +451,7 @@ const char *passport; const char *content_type; - purple_debug_info("MSNP14","Process UBM payload:%.*s\n", len, payload); + purple_debug_info("MSNP14","Process UBM payload:%.*s\n", (guint)len, payload); msg = msn_message_new_from_cmd(cmdproc->session, cmd); msn_message_parse_payload(msg, payload, len,MSG_LINE_DEM,MSG_BODY_DEM); @@ -530,7 +532,7 @@ }else{ g_return_if_fail(cmd->payload_cb != NULL); - purple_debug_info("MSNP14","UBM payload:{%.*s}\n", cmd->payload_len, cmd->payload); + purple_debug_info("MSNP14", "UBM payload:{%.*s}\n", (guint)(cmd->payload_len), cmd->payload); ubm_cmd_post(cmdproc, cmd, cmd->payload, cmd->payload_len); } } @@ -645,7 +647,7 @@ { MsnTransaction *trans; purple_debug_info("MSN Notification","Sending ADL with payload: %s\n", payload); - trans = msn_transaction_new(cmdproc, "ADL","%d", strlen(payload)); + trans = msn_transaction_new(cmdproc, "ADL","%" G_GSIZE_FORMAT, strlen(payload)); msn_transaction_set_payload(trans, payload, strlen(payload)); msn_cmdproc_send_trans(cmdproc, trans); } @@ -729,7 +731,7 @@ domain = tokens[1]; payload = g_strdup_printf("<ml><d n=\"%s\"><c n=\"%s\"/></d></ml>", domain, email); - trans = msn_transaction_new(cmdproc, "FQY","%d", strlen(payload)); + trans = msn_transaction_new(cmdproc, "FQY","%" G_GSIZE_FORMAT, strlen(payload)); msn_transaction_set_payload(trans, payload, strlen(payload)); msn_cmdproc_send_trans(cmdproc, trans); @@ -2070,7 +2072,7 @@ xmlnode_free(rml_node); purple_debug_info("MSN Notification","Send RML with payload:\n%s\n", payload); - trans = msn_transaction_new(cmdproc, "RML","%d", strlen(payload)); + trans = msn_transaction_new(cmdproc, "RML","%" G_GSIZE_FORMAT, strlen(payload)); msn_transaction_set_payload(trans, payload, strlen(payload)); msn_cmdproc_send_trans(cmdproc, trans); g_free(payload);
--- a/libpurple/protocols/msn/slplink.c Sat May 03 02:49:53 2008 +0000 +++ b/libpurple/protocols/msn/slplink.c Sat May 03 03:02:25 2008 +0000 @@ -598,7 +598,9 @@ { if ((offset + len) > slpmsg->size) { - purple_debug_error("msn", "Oversized slpmsg - msgsize=%lld offset=%d len=%d\n", slpmsg->size, offset, len); + purple_debug_error("msn", + "Oversized slpmsg - msgsize=%lld offset=%" G_GSIZE_FORMAT " len=%" G_GSIZE_FORMAT "\n", + slpmsg->size, offset, len); g_return_if_reached(); } else
--- a/libpurple/protocols/msn/soap.c Sat May 03 02:49:53 2008 +0000 +++ b/libpurple/protocols/msn/soap.c Sat May 03 03:02:25 2008 +0000 @@ -273,7 +273,7 @@ case EAGAIN: return len; default : purple_debug_error("MSN SOAP", "Read error!" - "read len: %d, error = %s\n", + "read len: %" G_GSSIZE_FORMAT ", error = %s\n", len, g_strerror(errno)); purple_input_remove(soapconn->input_handler); //soapconn->input_handler = 0; @@ -293,7 +293,9 @@ soapconn->read_buf[soapconn->read_len] = '\0'; } else { - purple_debug_error("MSN SOAP", "Failure re-allocating %d bytes of memory!\n", soapconn->read_len + len + 1); + purple_debug_error("MSN SOAP", + "Failure re-allocating %" G_GSIZE_FORMAT " bytes of memory!\n", + soapconn->read_len + len + 1); exit(EXIT_FAILURE); } @@ -301,7 +303,9 @@ #if defined(MSN_SOAP_DEBUG) if (len > 0) - purple_debug_info("MSN SOAP","Read %d bytes from SOAP server:\n%s\n", len, soapconn->read_buf + soapconn->read_len - len); + purple_debug_info("MSN SOAP", + "Read %" G_GSIZE_FORMAT " bytes from SOAP server:\n%s\n", len, + soapconn->read_buf + soapconn->read_len - len); #endif return len; @@ -523,7 +527,9 @@ soapconn->body_len = atoi(body_len); g_free(body_len); #ifdef MSN_SOAP_DEBUG - purple_debug_misc("MSN SOAP","SOAP bytes read so far: %d, Content-Length: %d\n", soapconn->read_len, soapconn->body_len); + purple_debug_misc("MSN SOAP", + "SOAP bytes read so far: %" G_GSIZE_FORMAT ", Content-Length: %d\n", + soapconn->read_len, soapconn->body_len); #endif soapconn->need_to_read = (body_start - soapconn->read_buf + soapconn->body_len) - soapconn->read_len; if ( soapconn->need_to_read > 0 ) {
--- a/libpurple/protocols/msn/state.c Sat May 03 02:49:53 2008 +0000 +++ b/libpurple/protocols/msn/state.c Sat May 03 03:02:25 2008 +0000 @@ -250,7 +250,7 @@ payload = session->psm; purple_debug_misc("MSNP14","Sending UUX command with payload: %s\n",payload); - trans = msn_transaction_new(cmdproc, "UUX", "%d", strlen(payload)); + trans = msn_transaction_new(cmdproc, "UUX", "%" G_GSIZE_FORMAT, strlen(payload)); msn_transaction_set_payload(trans, payload, strlen(payload)); msn_cmdproc_send_trans(cmdproc, trans);
--- a/libpurple/protocols/msn/switchboard.c Sat May 03 02:49:53 2008 +0000 +++ b/libpurple/protocols/msn/switchboard.c Sat May 03 03:02:25 2008 +0000 @@ -544,7 +544,7 @@ msn_message_show_readable(msg, "SB SEND", FALSE); #endif - trans = msn_transaction_new(cmdproc, "MSG", "%c %d", + trans = msn_transaction_new(cmdproc, "MSG", "%c %" G_GSIZE_FORMAT, msn_message_get_flag(msg), payload_len); /* Data for callbacks */