changeset 6842:bd433a45a463

[gaim-migrate @ 7387] Committing what I have of MSN before I screw up my tree with some other changes. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 14 Sep 2003 22:00:11 +0000
parents f76e26a0e6a9
children 549a0bbbf73d
files src/protocols/msn/msg.c src/protocols/msn/msn.c src/protocols/msn/msnslp.c src/protocols/msn/servconn.c src/protocols/msn/switchboard.c
diffstat 5 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/msn/msg.c	Sun Sep 14 21:32:17 2003 +0000
+++ b/src/protocols/msn/msg.c	Sun Sep 14 22:00:11 2003 +0000
@@ -421,7 +421,7 @@
 
 		if (body != NULL)
 		{
-			g_strlcpy(c, body, c - msg_start);
+			g_strlcpy(c, body, msg->size - (c - msg_start));
 
 			c += strlen(body);
 
--- a/src/protocols/msn/msn.c	Sun Sep 14 21:32:17 2003 +0000
+++ b/src/protocols/msn/msn.c	Sun Sep 14 22:00:11 2003 +0000
@@ -20,7 +20,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #include <glib.h>
-static void (*real_g_free)(gpointer) = g_free;
 
 #include "msn.h"
 #include "accountopt.h"
--- a/src/protocols/msn/msnslp.c	Sun Sep 14 21:32:17 2003 +0000
+++ b/src/protocols/msn/msnslp.c	Sun Sep 14 22:00:11 2003 +0000
@@ -80,6 +80,8 @@
 	if (strlen(body) == 0)
 	{
 		/* ACK. Ignore it. */
+		gaim_debug_info("msn", "Received MSNSLP ACK\n");
+
 		return FALSE;
 	}
 
@@ -119,7 +121,7 @@
 	msn_message_set_attr(msg, "P2P-Dest",
 			msn_user_get_passport(msn_message_get_receiver(msg)));
 
-	if (msg->msnslp_header.session_id == 0)
+	if (msg->msnslp_header.session_id != 0)
 		msg->msnslp_footer.app_id = 1;
 
 	msn_switchboard_send_msg(slpsession->swboard, msg);
@@ -132,6 +134,7 @@
 									 const MsnObject *obj)
 {
 	MsnMessage *invite_msg;
+	long session_id;
 	char *msnobj_data;
 	char *msnobj_base64;
 	char *branch;
@@ -152,7 +155,7 @@
 	if ((c = strchr(msnobj_base64, '=')) != NULL)
 		*c = '\0';
 
-	slpsession->session_id = rand() % 0xFFFFFF00 + 4;
+	session_id = rand() % 0xFFFFFF00 + 4;
 
 	branch = g_strdup_printf("%4X%4X-%4X-%4X-%4X-%4X%4X%4X",
 							 rand() % 0xAAFF + 0x1111,
@@ -179,7 +182,7 @@
 		"SessionID: %ld\r\n"
 		"AppID: 1\r\n"
 		"Context: %s",
-		slpsession->session_id,
+		session_id,
 		msnobj_base64);
 
 	g_free(msnobj_base64);
--- a/src/protocols/msn/servconn.c	Sun Sep 14 21:32:17 2003 +0000
+++ b/src/protocols/msn/servconn.c	Sun Sep 14 22:00:11 2003 +0000
@@ -337,10 +337,8 @@
 {
 	g_return_val_if_fail(servconn != NULL, 0);
 
-#if 0
 	gaim_debug(GAIM_DEBUG_MISC, "msn", "C: %s%s", buf,
 			   (*(buf + size - 1) == '\n' ? "" : "\n"));
-#endif
 
 	return write(servconn->fd, buf, size);
 }
--- a/src/protocols/msn/switchboard.c	Sun Sep 14 21:32:17 2003 +0000
+++ b/src/protocols/msn/switchboard.c	Sun Sep 14 22:00:11 2003 +0000
@@ -94,7 +94,7 @@
 
 	send_clientcaps(swboard);
 
-	if (session->protocol_ver >= 9)
+	if (0 && session->protocol_ver >= 9)
 	{
 		MsnUser *local_user, *remote_user;