diff src/protocols/msn/msg.c @ 19809:b488205ad0bc

[gaim-migrate @ 16884] chat function ok debugging the multiple soap request in one ssl connection not stable. comitted by MaYuan<mayuan2006@gmail.com> committer: Ethan Blanton <elb@pidgin.im>
author Ma Yuan <mayuan2006@gmail.com>
date Sat, 19 Aug 2006 14:12:41 +0000
parents 75ecc42d3e8d
children da1075366756
line wrap: on
line diff
--- a/src/protocols/msn/msg.c	Sat Aug 19 11:46:33 2006 +0000
+++ b/src/protocols/msn/msg.c	Sat Aug 19 14:12:41 2006 +0000
@@ -23,6 +23,7 @@
  */
 #include "msn.h"
 #include "msg.h"
+#define MSN_DEBUG_MSG
 
 MsnMessage *
 msn_message_new(MsnMsgType type)
@@ -123,12 +124,12 @@
 //	msn_message_set_attr(msg, "User-Agent", "Gaim/" VERSION);
 	msn_message_set_content_type(msg, "text/plain");
 	msn_message_set_charset(msg, "UTF-8");
-	msn_message_set_flag(msg, 'N');
+	msn_message_set_flag(msg, 'A');
 	msn_message_set_attr(msg, "X-MMS-IM-Format",
 						 "FN=MS%20Sans%20Serif; EF=; CO=0; CS=86;PF=0");
 
 	message_cr = gaim_str_add_cr(message);
-	msn_message_set_bin_data(msg, message_cr, strlen(message_cr)+1);
+	msn_message_set_bin_data(msg, message_cr, strlen(message_cr));
 	g_free(message_cr);
 
 	return msg;
@@ -514,14 +515,11 @@
 	if (msg->body != NULL)
 		g_free(msg->body);
 
-	if (data != NULL && len > 0)
-	{
+	if (data != NULL && len > 0){
 		msg->body = g_malloc0(len + 1);
 		memcpy(msg->body, data, len);
 		msg->body_len = len;
-	}
-	else
-	{
+	}else{
 		msg->body = NULL;
 		msg->body_len = 0;
 	}