diff libpurple/protocols/msn/slp.c @ 19797:60bc06498746

Committing khc's msnp14 changes from Trac Ticket #148. --rlaager committer: Richard Laager <rlaager@wiktel.com>
author Ka-Hing Cheung <khc@hxbc.us>
date Sun, 15 Apr 2007 04:12:27 +0000
parents 32c366eeeb99
children 1122d47583a1
line wrap: on
line diff
--- a/libpurple/protocols/msn/slp.c	Sun Apr 15 00:32:57 2007 +0000
+++ b/libpurple/protocols/msn/slp.c	Sun Apr 15 04:12:27 2007 +0000
@@ -33,6 +33,8 @@
 
 /* ms to delay between sending buddy icon requests to the server. */
 #define BUDDY_ICON_DELAY 20000
+/*debug SLP*/
+#define MSN_DEBUG_UD
 
 static void send_ok(MsnSlpCall *slpcall, const char *branch,
 					const char *type, const char *content);
@@ -751,7 +753,7 @@
 		 * reporting bugs. Hopefully this doesn't cause more crashes. Stu.
 		 */
 		if (slplink->swboard != NULL)
-			slplink->swboard->slplinks = g_list_prepend(slplink->swboard->slplinks, slplink);
+			slplink->swboard->slplink = slplink;
 		else
 			purple_debug_error("msn", "msn_p2p_msg, swboard is NULL, ouch!\n");
 	}
@@ -771,15 +773,14 @@
 	gc = slpcall->slplink->session->account->gc;
 	who = slpcall->slplink->remote_user;
 
-	if ((conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, who, gc->account))) {
+	conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, who, gc->account);
 
-		/* FIXME: it would be better if we wrote the data as we received it
-		          instead of all at once, calling write multiple times and
-		          close once at the very end
-		*/
-		purple_conv_custom_smiley_write(conv, slpcall->data_info, data, size);
-		purple_conv_custom_smiley_close(conv, slpcall->data_info);
-	}
+	/* FIXME: it would be better if we wrote the data as we received it
+	          instead of all at once, calling write multiple times and
+	          close once at the very end
+	*/
+	purple_conv_custom_smiley_write(conv, slpcall->data_info, data, size);
+	purple_conv_custom_smiley_close(conv, slpcall->data_info );
 #ifdef MSN_DEBUG_UD
 	purple_debug_info("msn", "Got smiley: %s\n", slpcall->data_info);
 #endif