~prateek.karandikar/ubuntu/precise/pidgin/add_quicklist

« back to all changes in this revision

Viewing changes to libpurple/protocols/msn/slplink.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-07-27 16:15:45 UTC
  • mfrom: (2.3.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100727161545-nu4fx09lgogqutlb
Tags: 1:2.7.2-1ubuntu1
Resync on Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
214
214
                slplink->swboard = NULL;
215
215
        }
216
216
 
217
 
        /* The slplink has no slpcalls in it, release it from the DC. */
218
 
        if (slplink->slp_calls == NULL && slplink->dc != NULL) {
219
 
                slplink->dc->slplink = NULL;
220
 
                msn_dc_destroy(slplink->dc);
221
 
                slplink->dc = NULL;
 
217
        if (slplink->dc != NULL) {
 
218
                if ((slplink->dc->state != DC_STATE_ESTABLISHED && slplink->dc->slpcall == slpcall)
 
219
                 || (slplink->slp_calls == NULL)) {
 
220
                        /* The DC is not established and its corresponding slpcall is dead,
 
221
                         * or the slplink has no slpcalls in it and no longer needs the DC.
 
222
                         */
 
223
                        slplink->dc->slplink = NULL;
 
224
                        msn_dc_destroy(slplink->dc);
 
225
                        slplink->dc = NULL;
 
226
                }
222
227
        }
223
228
}
224
229