From: <the...@us...> - 2006-07-20 07:31:39
|
Revision: 16524 Author: thekingant Date: 2006-07-20 00:31:37 -0700 (Thu, 20 Jul 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16524&view=rev Log Message: ----------- Backport SVN revision #16523 from HEAD to v2_0_0 Original commit message: Fix a crazy MSN crash. Basically it's possible to have more than one slplink associated with a given switchboard, but our code did not allow for that. I think it happens when you're in a multi-user chat and you do stuff with multiple users that involves slplinks. Like maybe file transfer and buddy icon related stuff. Tracking this down took an ungodly amount of time, but thanks to Meebo for letting me do it :-) ViewCVS Links: ------------- http://svn.sourceforge.net/gaim/?rev=16523&view=rev Modified Paths: -------------- branches/v2_0_0/src/protocols/msn/slp.c branches/v2_0_0/src/protocols/msn/slplink.c branches/v2_0_0/src/protocols/msn/switchboard.c branches/v2_0_0/src/protocols/msn/switchboard.h Modified: branches/v2_0_0/src/protocols/msn/slp.c =================================================================== --- branches/v2_0_0/src/protocols/msn/slp.c 2006-07-20 07:31:15 UTC (rev 16523) +++ branches/v2_0_0/src/protocols/msn/slp.c 2006-07-20 07:31:37 UTC (rev 16524) @@ -748,7 +748,7 @@ * reporting bugs. Hopefully this doesn't cause more crashes. Stu. */ if (slplink->swboard != NULL) - slplink->swboard->slplink = slplink; + slplink->swboard->slplinks = g_list_prepend(slplink->swboard->slplinks, slplink); else gaim_debug_error("msn", "msn_p2p_msg, swboard is NULL, ouch!\n"); } Modified: branches/v2_0_0/src/protocols/msn/slplink.c =================================================================== --- branches/v2_0_0/src/protocols/msn/slplink.c 2006-07-20 07:31:15 UTC (rev 16523) +++ branches/v2_0_0/src/protocols/msn/slplink.c 2006-07-20 07:31:37 UTC (rev 16524) @@ -102,7 +102,7 @@ g_return_if_fail(slplink != NULL); if (slplink->swboard != NULL) - slplink->swboard->slplink = NULL; + slplink->swboard->slplinks = g_list_remove(slplink->swboard->slplinks, slplink); session = slplink->session; @@ -256,7 +256,7 @@ return; /* If swboard is destroyed we will be too */ - slplink->swboard->slplink = slplink; + slplink->swboard->slplinks = g_list_prepend(slplink->swboard->slplinks, slplink); } msn_switchboard_send_msg(slplink->swboard, msg, TRUE); Modified: branches/v2_0_0/src/protocols/msn/switchboard.c =================================================================== --- branches/v2_0_0/src/protocols/msn/switchboard.c 2006-07-20 07:31:15 UTC (rev 16523) +++ branches/v2_0_0/src/protocols/msn/switchboard.c 2006-07-20 07:31:37 UTC (rev 16524) @@ -82,8 +82,8 @@ swboard->destroying = TRUE; /* If it linked us is because its looking for trouble */ - if (swboard->slplink != NULL) - msn_slplink_destroy(swboard->slplink); + while (swboard->slplinks != NULL) + msn_slplink_destroy(swboard->slplinks->data); /* Destroy the message queue */ while ((msg = g_queue_pop_head(swboard->msg_queue)) != NULL) Modified: branches/v2_0_0/src/protocols/msn/switchboard.h =================================================================== --- branches/v2_0_0/src/protocols/msn/switchboard.h 2006-07-20 07:31:15 UTC (rev 16523) +++ branches/v2_0_0/src/protocols/msn/switchboard.h 2006-07-20 07:31:37 UTC (rev 16524) @@ -102,7 +102,7 @@ MsnSBErrorType error; /**< The error that occurred in this switchboard (if applicable). */ - MsnSlpLink *slplink; /**< The slplink that is using this switchboard. */ + GList *slplinks; /**< The list of slplinks that are using this switchboard. */ }; /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |