diff src/protocols/msn/slpcall.c @ 10345:2e01c503aa4f

[gaim-migrate @ 11556] Patch 1078151 from Felipe Contreras to fix some more MSN bugs: "User Dislpay messages, and other less used, did not set an slpcall, so the callback that should not be called, was called (in some very special cases)." ... "Here it goes the real real one, as far as I can tell. Cleaning + organizing + documentation + hard bug fix = big patch." -- Felipe Contreras I also fixed drag-and-drop to conversation window file transfers (which I had broken when I fixed some other dnd thing), made the debug output of the autoreconnect plugin more useful, and stopped the message notification plugin notifying you for messages sent by ignored users. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 11 Dec 2004 20:01:58 +0000
parents a7b2fd5efcf2
children 92d4a25fd33c
line wrap: on
line diff
--- a/src/protocols/msn/slpcall.c	Sat Dec 11 00:06:06 2004 +0000
+++ b/src/protocols/msn/slpcall.c	Sat Dec 11 20:01:58 2004 +0000
@@ -68,27 +68,6 @@
 }
 
 void
-msn_slp_call_init(MsnSlpCall *slpcall, MsnSlpCallType type)
-{
-	slpcall->session_id = rand() % 0xFFFFFF00 + 4;
-	slpcall->id = rand_guid();
-	slpcall->type = type;
-}
-
-void
-msn_slp_call_session_init(MsnSlpCall *slpcall)
-{
-	MsnSlpSession *slpsession;
-
-	slpsession = msn_slp_session_new(slpcall);
-
-	if (slpcall->session_init_cb)
-		slpcall->session_init_cb(slpsession);
-
-	slpcall->started = TRUE;
-}
-
-void
 msn_slp_call_destroy(MsnSlpCall *slpcall)
 {
 	GList *e;
@@ -117,14 +96,11 @@
 
 		g_return_if_fail(slpmsg != NULL);
 
+		gaim_debug_info("msn", "slpcall destroy: tryping slp_msg (%p)\n",
+						slpmsg);
+
 		if (slpmsg->slpcall == slpcall)
-		{
-#if 1
 			msn_slpmsg_destroy(slpmsg);
-#else
-			slpmsg->wasted = TRUE;
-#endif
-		}
 	}
 
 	if (slpcall->end_cb != NULL)
@@ -134,6 +110,27 @@
 }
 
 void
+msn_slp_call_init(MsnSlpCall *slpcall, MsnSlpCallType type)
+{
+	slpcall->session_id = rand() % 0xFFFFFF00 + 4;
+	slpcall->id = rand_guid();
+	slpcall->type = type;
+}
+
+void
+msn_slp_call_session_init(MsnSlpCall *slpcall)
+{
+	MsnSlpSession *slpsession;
+
+	slpsession = msn_slp_session_new(slpcall);
+
+	if (slpcall->session_init_cb)
+		slpcall->session_init_cb(slpsession);
+
+	slpcall->started = TRUE;
+}
+
+void
 msn_slp_call_invite(MsnSlpCall *slpcall, const char *euf_guid,
 					int app_id, const char *context)
 {
@@ -164,7 +161,7 @@
 
 	slpmsg = msn_slpmsg_sip_new(slpcall, 0, header, slpcall->branch,
 								"application/x-msnmsgr-sessionreqbody", content);
-#ifdef DEBUG_SLP
+#ifdef MSN_DEBUG_SLP
 	slpmsg->info = "SLP INVITE";
 	slpmsg->text_body = TRUE;
 #endif