changeset 19820:ea23c4c010cf

[gaim-migrate @ 17006] fix msg send bug tested ok on windows committed by MaYuan<mayuan2006@gmail.com> committer: Ethan Blanton <elb@pidgin.im>
author Ma Yuan <mayuan2006@gmail.com>
date Wed, 23 Aug 2006 17:01:31 +0000
parents bf8fb36097ee
children 0af038b3b7fe
files src/protocols/msn/msg.c src/protocols/msn/notification.c
diffstat 2 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/msn/msg.c	Wed Aug 23 16:25:54 2006 +0000
+++ b/src/protocols/msn/msg.c	Wed Aug 23 17:01:31 2006 +0000
@@ -468,16 +468,14 @@
 	}
 	else
 	{
-		if (body != NULL)
-		{
+		if (body != NULL){
 			memcpy(n, body, body_len);
 			n += body_len;
-//			n = '\0';
+			*n = '\0';
 		}
 	}
 
-	if (ret_size != NULL)
-	{
+	if (ret_size != NULL){
 		*ret_size = n - base;
 
 		if (*ret_size > 1664)
--- a/src/protocols/msn/notification.c	Wed Aug 23 16:25:54 2006 +0000
+++ b/src/protocols/msn/notification.c	Wed Aug 23 17:01:31 2006 +0000
@@ -419,7 +419,7 @@
 	gaim_debug_info("MaYuan","send UUM,payload{%s},strlen:%d,len:%d\n",
 		payload,strlen(payload),payload_len);
 	type = msg->type;
-	trans = msn_transaction_new(cmdproc, "UUM","%s 32 %d %d",msg->remote_user,type,strlen(payload));
+	trans = msn_transaction_new(cmdproc, "UUM","%s 32 %d %d",msg->remote_user,type,payload_len);
 	msn_transaction_set_payload(trans, payload, strlen(payload));
 	msn_cmdproc_send_trans(cmdproc, trans);
 }