changeset 24438:e7a419e04da0

merge of '1d9a1da300a6d07aa721ebc00ee40b928cdd790d' and '2153f4107240dcbbf4ee52f56a5a310f1c9be4d9'
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sun, 23 Nov 2008 21:57:49 +0000
parents 4f46eb13b540 (current diff) 3d942f1b72aa (diff)
children afbc5c1203f2
files
diffstat 2 files changed, 22 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/notification.c	Sun Nov 23 08:39:39 2008 +0000
+++ b/libpurple/protocols/msn/notification.c	Sun Nov 23 21:57:49 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 = atoi(cmd->params[3]);
+		cmd->payload_len = atoi(cmd->params[4]);
 	} else {
 		g_return_if_fail(cmd->payload_cb != NULL);
 
@@ -1578,7 +1578,7 @@
 	MsnUser *user;
 	const char *passport;
 	char *psm_str, *str;
-	CurrentMedia media = {CURRENT_MEDIA_UNKNOWN, NULL, NULL, NULL};
+	CurrentMedia media = {NULL, NULL, NULL};
 
 	session = cmdproc->session;
 	account = session->account;
--- a/libpurple/protocols/msn/switchboard.c	Sun Nov 23 08:39:39 2008 +0000
+++ b/libpurple/protocols/msn/switchboard.c	Sun Nov 23 21:57:49 2008 +0000
@@ -577,7 +577,6 @@
 	MsnTransaction *trans;
 	char *payload;
 	gsize payload_len;
-	char flag;
 
 	g_return_if_fail(swboard != NULL);
 	g_return_if_fail(msg     != NULL);
@@ -591,35 +590,32 @@
 	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,
-								flag, payload_len);
+								msn_message_get_flag(msg), payload_len);
 
 	/* Data for callbacks */
 	msn_transaction_set_data(trans, msg);
 
-	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)
+	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)
 		{
-			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);
-			}
+			msn_transaction_add_cb(trans, "ACK", msg_ack);
+			msn_transaction_add_cb(trans, "NAK", msg_nak);
+		}
 #endif
-		}
 	}
 
 	trans->payload = payload;
@@ -810,7 +806,7 @@
 ubm_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
 {
 	purple_debug_misc("msn", "get UBM...\n");
-	cmd->payload_len = atoi(cmd->params[3]);
+	cmd->payload_len = atoi(cmd->params[4]);
 	cmdproc->last_cmd->payload_cb = msg_cmd_post;
 }