Mercurial > pidgin
comparison libpurple/protocols/msn/slplink.c @ 30736:2bc54dfae627
propagate from branch 'im.pidgin.pidgin' (head fcd99a6bb8c6362d64f295a1b95a5b1130460b85)
to branch 'im.pidgin.cpw.qulogic.msnp16' (head cbd8759937c56ce697bc9ca16dc2c5961905a0af)
author | masca@cpw.pidgin.im |
---|---|
date | Wed, 26 May 2010 19:47:56 +0000 |
parents | 66e7fe9f7810 287fc4ac2bd9 |
children | a99b6dcdb60d 562498203fe8 |
comparison
equal
deleted
inserted
replaced
30735:66e7fe9f7810 | 30736:2bc54dfae627 |
---|---|
99 return; | 99 return; |
100 } | 100 } |
101 | 101 |
102 session = slplink->session; | 102 session = slplink->session; |
103 | 103 |
104 if (slplink->dc != NULL) | 104 if (slplink->dc != NULL) { |
105 slplink->dc->slplink = NULL; | |
105 msn_dc_destroy(slplink->dc); | 106 msn_dc_destroy(slplink->dc); |
107 slplink->dc = NULL; | |
108 } | |
106 | 109 |
107 while (slplink->slp_calls != NULL) | 110 while (slplink->slp_calls != NULL) |
108 msn_slpcall_destroy(slplink->slp_calls->data); | 111 msn_slpcall_destroy(slplink->slp_calls->data); |
109 | 112 |
110 g_queue_free(slplink->slp_msg_queue); | 113 g_queue_free(slplink->slp_msg_queue); |
201 slplink->slp_calls = g_list_remove(slplink->slp_calls, slpcall); | 204 slplink->slp_calls = g_list_remove(slplink->slp_calls, slpcall); |
202 | 205 |
203 /* The slplink has no slpcalls in it, release it from MSN_SB_FLAG_FT. | 206 /* The slplink has no slpcalls in it, release it from MSN_SB_FLAG_FT. |
204 * If nothing else is using it then this might cause swboard to be | 207 * If nothing else is using it then this might cause swboard to be |
205 * destroyed. */ | 208 * destroyed. */ |
206 if (slplink->slp_calls == NULL && slplink->swboard != NULL) | 209 if (slplink->slp_calls == NULL && slplink->swboard != NULL) { |
207 msn_switchboard_release(slplink->swboard, MSN_SB_FLAG_FT); | 210 msn_switchboard_release(slplink->swboard, MSN_SB_FLAG_FT); |
211 slplink->swboard = NULL; | |
212 } | |
208 | 213 |
209 /* The slplink has no slpcalls in it, release it from the DC. */ | 214 /* The slplink has no slpcalls in it, release it from the DC. */ |
210 if (slplink->slp_calls == NULL && slplink->dc != NULL) | 215 if (slplink->slp_calls == NULL && slplink->dc != NULL) { |
211 msn_dc_destroy(slplink->dc); | 216 msn_dc_destroy(slplink->dc); |
217 slplink->dc = NULL; | |
218 } | |
212 } | 219 } |
213 | 220 |
214 MsnSlpCall * | 221 MsnSlpCall * |
215 msn_slplink_find_slp_call(MsnSlpLink *slplink, const char *id) | 222 msn_slplink_find_slp_call(MsnSlpLink *slplink, const char *id) |
216 { | 223 { |
313 #ifdef MSN_DEBUG_SLP_FILES | 320 #ifdef MSN_DEBUG_SLP_FILES |
314 debug_msg_to_file(msg, TRUE); | 321 debug_msg_to_file(msg, TRUE); |
315 #endif | 322 #endif |
316 | 323 |
317 slpmsg->msgs = | 324 slpmsg->msgs = |
318 g_list_append(slpmsg->msgs, msg); | 325 g_list_append(slpmsg->msgs, msn_message_ref(msg)); |
319 msn_slplink_send_msg(slplink, msg); | 326 msn_slplink_send_msg(slplink, msg); |
320 | 327 |
321 if ((slpmsg->flags == 0x20 || slpmsg->flags == 0x1000020 || | 328 if ((slpmsg->flags == 0x20 || slpmsg->flags == 0x1000020 || |
322 slpmsg->flags == 0x1000030) && | 329 slpmsg->flags == 0x1000030) && |
323 (slpmsg->slpcall != NULL)) | 330 (slpmsg->slpcall != NULL)) |
372 slpmsg->slpcall->cb(slpmsg->slpcall, | 379 slpmsg->slpcall->cb(slpmsg->slpcall, |
373 NULL, 0); | 380 NULL, 0); |
374 } | 381 } |
375 } | 382 } |
376 } | 383 } |
384 | |
385 msn_message_unref(msg); | |
377 } | 386 } |
378 | 387 |
379 /* We have received the message nak. */ | 388 /* We have received the message nak. */ |
380 static void | 389 static void |
381 msg_nak(MsnMessage *msg, void *data) | 390 msg_nak(MsnMessage *msg, void *data) |
385 slpmsg = data; | 394 slpmsg = data; |
386 | 395 |
387 msn_slplink_send_msgpart(slpmsg->slplink, slpmsg); | 396 msn_slplink_send_msgpart(slpmsg->slplink, slpmsg); |
388 | 397 |
389 slpmsg->msgs = g_list_remove(slpmsg->msgs, msg); | 398 slpmsg->msgs = g_list_remove(slpmsg->msgs, msg); |
399 msn_message_unref(msg); | |
390 } | 400 } |
391 | 401 |
392 static void | 402 static void |
393 msn_slplink_release_slpmsg(MsnSlpLink *slplink, MsnSlpMessage *slpmsg) | 403 msn_slplink_release_slpmsg(MsnSlpLink *slplink, MsnSlpMessage *slpmsg) |
394 { | 404 { |