Mercurial > pidgin.yaz
diff src/protocols/msn/slpcall.c @ 10773:888d4c328be5
[gaim-migrate @ 12382]
Patch 1149564 from Felipe Contreras:
"[MSN] Cleanups and fixes
I know it fixes a multiple conversation close
notification but it probably fixes more stuff.
I don't know exactly what are the diferences with what
Stu did."
I munged it a bit, to make it compile and stuff.
Please test this, I might have broken it.
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sat, 02 Apr 2005 16:38:33 +0000 |
parents | f52ab405f1ab |
children | 93663df88ec4 |
line wrap: on
line diff
--- a/src/protocols/msn/slpcall.c Sat Apr 02 16:07:20 2005 +0000 +++ b/src/protocols/msn/slpcall.c Sat Apr 02 16:38:33 2005 +0000 @@ -27,6 +27,8 @@ #include "slp.h" +/* #define MSN_DEBUG_SLPCALL */ + /************************************************************************** * Util **************************************************************************/ @@ -58,6 +60,10 @@ slpcall = g_new0(MsnSlpCall, 1); +#ifdef MSN_DEBUG_SLPCALL + gaim_debug_info("msn", "slpcall_new: slpcall(%p)\n", slpcall); +#endif + slpcall->slplink = slplink; msn_slplink_add_slpcall(slplink, slpcall); @@ -72,6 +78,10 @@ { GList *e; +#ifdef MSN_DEBUG_SLPCALL + gaim_debug_info("msn", "slpcall_destroy: slpcall(%p)\n", slpcall); +#endif + g_return_if_fail(slpcall != NULL); if (slpcall->timer) @@ -86,17 +96,13 @@ if (slpcall->data_info != NULL) g_free(slpcall->data_info); - msn_slplink_remove_slpcall(slpcall->slplink, slpcall); - for (e = slpcall->slplink->slp_msgs; e != NULL; ) { MsnSlpMessage *slpmsg = e->data; e = e->next; - g_return_if_fail(slpmsg != NULL); - -#if 0 - gaim_debug_info("msn", "slpcall destroy: trying slp_msg (%p)\n", +#ifdef MSN_DEBUG_SLPCALL_VERBOSE + gaim_debug_info("msn", "slpcall_destroy: trying slpmsg(%p)\n", slpmsg); #endif @@ -106,6 +112,8 @@ } } + msn_slplink_remove_slpcall(slpcall->slplink, slpcall); + if (slpcall->end_cb != NULL) slpcall->end_cb(slpcall); @@ -164,6 +172,7 @@ slpmsg = msn_slpmsg_sip_new(slpcall, 0, header, slpcall->branch, "application/x-msnmsgr-sessionreqbody", content); + #ifdef MSN_DEBUG_SLP slpmsg->info = "SLP INVITE"; slpmsg->text_body = TRUE; @@ -193,7 +202,9 @@ slpcall = data; - gaim_debug_info("msn", "slpcall timeout (%p)\n", slpcall); +#ifdef MSN_DEBUG_SLPCALL + gaim_debug_info("msn", "slpcall_timeout: slpcall(%p)\n", slpcall); +#endif if (!slpcall->pending && !slpcall->progress) { @@ -232,12 +243,6 @@ slpcall->cb(slpcall, body, body_len); - /* TODO: Shall we send a BYE? I don't think so*/ -#if 0 - send_bye(slpcall, "application/x-msnmsgr-sessionclosebody"); - msn_slplink_unleash(slpcall->slplink); -#endif - slpcall->wasted = TRUE; } }