pidgin: 2f409bcd: Mark added a workaround for not having e...
qulogic at pidgin.im
qulogic at pidgin.im
Sat Nov 22 23:25:33 EST 2008
-----------------------------------------------------------------
Revision: 2f409bcdde5ebbb1edf097aeb4b4366d7c71518d
Ancestor: a486f2434bfdc4b53ace6341378dd4f1ff6a7f03
Author: qulogic at pidgin.im
Date: 2008-11-23T04:12:43
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/2f409bcdde5ebbb1edf097aeb4b4366d7c71518d
Modified files:
libpurple/protocols/msn/notification.c
libpurple/protocols/msn/switchboard.c
ChangeLog:
Mark added a workaround for not having enough parameters in this command.
However, according to msnpiki and his backtraces, the index was just wrong.
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/notification.c ea7644b1389c1b91eab7ea7fc66c5f3c5a769c93
+++ libpurple/protocols/msn/notification.c 648cf161239f36f0abe0a43ea44693855e7b86b6
@@ -491,7 +491,7 @@ ubm_cmd(MsnCmdProc *cmdproc, MsnCommand
* command and we are processing it */
if (cmd->payload == NULL) {
cmdproc->last_cmd->payload_cb = msg_cmd_post;
- cmd->payload_len = atoi(cmd->params[4]);
+ cmd->payload_len = atoi(cmd->params[3]);
} else {
g_return_if_fail(cmd->payload_cb != NULL);
@@ -1578,7 +1578,7 @@ ubx_cmd_post(MsnCmdProc *cmdproc, MsnCom
MsnUser *user;
const char *passport;
char *psm_str, *str;
- CurrentMedia media = {NULL, NULL, NULL};
+ CurrentMedia media = {CURRENT_MEDIA_UNKNOWN, NULL, NULL, NULL};
session = cmdproc->session;
account = session->account;
============================================================
--- libpurple/protocols/msn/switchboard.c 8a0b0cf2ed01500745519525b4c8eb5040a36970
+++ libpurple/protocols/msn/switchboard.c 7a97c02db70c547f774794f7033bee831e012099
@@ -577,6 +577,7 @@ release_msg(MsnSwitchBoard *swboard, Msn
MsnTransaction *trans;
char *payload;
gsize payload_len;
+ char flag;
g_return_if_fail(swboard != NULL);
g_return_if_fail(msg != NULL);
@@ -590,32 +591,35 @@ release_msg(MsnSwitchBoard *swboard, Msn
msn_message_show_readable(msg, "SB SEND", FALSE);
#endif
+ flag = msn_message_get_flag(msg);
trans = msn_transaction_new(cmdproc, "MSG", "%c %" G_GSIZE_FORMAT,
- msn_message_get_flag(msg), payload_len);
+ flag, payload_len);
/* Data for callbacks */
msn_transaction_set_data(trans, msg);
- if (msg->type == MSN_MSG_TEXT)
- {
- msg->ack_ref = TRUE;
- msn_message_ref(msg);
- swboard->ack_list = g_list_append(swboard->ack_list, msg);
- msn_transaction_set_timeout_cb(trans, msg_timeout);
- }
- else if (msg->type == MSN_MSG_SLP)
- {
- msg->ack_ref = TRUE;
- msn_message_ref(msg);
- swboard->ack_list = g_list_append(swboard->ack_list, msg);
- msn_transaction_set_timeout_cb(trans, msg_timeout);
-#if 0
- if (msg->ack_cb != NULL)
+ if (flag != 'U') {
+ if (msg->type == MSN_MSG_TEXT)
{
- msn_transaction_add_cb(trans, "ACK", msg_ack);
- msn_transaction_add_cb(trans, "NAK", msg_nak);
+ msg->ack_ref = TRUE;
+ msn_message_ref(msg);
+ swboard->ack_list = g_list_append(swboard->ack_list, msg);
+ msn_transaction_set_timeout_cb(trans, msg_timeout);
}
+ else if (msg->type == MSN_MSG_SLP)
+ {
+ msg->ack_ref = TRUE;
+ msn_message_ref(msg);
+ swboard->ack_list = g_list_append(swboard->ack_list, msg);
+ msn_transaction_set_timeout_cb(trans, msg_timeout);
+#if 0
+ if (msg->ack_cb != NULL)
+ {
+ msn_transaction_add_cb(trans, "ACK", msg_ack);
+ msn_transaction_add_cb(trans, "NAK", msg_nak);
+ }
#endif
+ }
}
trans->payload = payload;
@@ -806,7 +810,7 @@ ubm_cmd(MsnCmdProc *cmdproc, MsnCommand
ubm_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
{
purple_debug_misc("msn", "get UBM...\n");
- cmd->payload_len = atoi(cmd->params[4]);
+ cmd->payload_len = atoi(cmd->params[3]);
cmdproc->last_cmd->payload_cb = msg_cmd_post;
}
More information about the Commits
mailing list