# HG changeset patch # User John Bailey # Date 1227425480 0 # Node ID 3667342896ce45b835fc982da03f6b7a7e0795f8 # Parent 3f80f211417eb5a55aec26a0462f7c558e01cb50# Parent c83ee78ecbe7b291f1b8d29e4ddc2eb68f4a1c0a merge of '2f409bcdde5ebbb1edf097aeb4b4366d7c71518d' and '52e5d841d66390cfc5a59e356e2a53b2e2b9df8a' diff -r c83ee78ecbe7 -r 3667342896ce libpurple/protocols/msn/notification.c --- a/libpurple/protocols/msn/notification.c Sun Nov 23 06:19:09 2008 +0000 +++ b/libpurple/protocols/msn/notification.c Sun Nov 23 07:31:20 2008 +0000 @@ -491,7 +491,7 @@ * command and we are processing it */ if (cmd->payload == NULL) { cmdproc->last_cmd->payload_cb = msg_cmd_post; - cmd->payload_len = cmd->param_count >= 5 ? atoi(cmd->params[4]) : 0; + cmd->payload_len = atoi(cmd->params[3]); } else { g_return_if_fail(cmd->payload_cb != NULL); @@ -1578,7 +1578,7 @@ 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; diff -r c83ee78ecbe7 -r 3667342896ce libpurple/protocols/msn/switchboard.c --- a/libpurple/protocols/msn/switchboard.c Sun Nov 23 06:19:09 2008 +0000 +++ b/libpurple/protocols/msn/switchboard.c Sun Nov 23 07:31:20 2008 +0000 @@ -577,6 +577,7 @@ 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 @@ 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 (flag != 'U') { + 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) - { - msn_transaction_add_cb(trans, "ACK", msg_ack); - msn_transaction_add_cb(trans, "NAK", msg_nak); + if (msg->ack_cb != NULL) + { + msn_transaction_add_cb(trans, "ACK", msg_ack); + msn_transaction_add_cb(trans, "NAK", msg_nak); + } +#endif } -#endif } trans->payload = payload; @@ -806,7 +810,7 @@ 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; }