Mercurial > pidgin
comparison libpurple/protocols/msn/directconn.c @ 30805:dfada77da5cb
Reomove MsnMessage reference from DirectConn.
author | masca@cpw.pidgin.im |
---|---|
date | Thu, 17 Jun 2010 19:54:52 +0000 |
parents | 0678ad30aa65 |
children | e935d15725c3 |
comparison
equal
deleted
inserted
replaced
30804:0678ad30aa65 | 30805:dfada77da5cb |
---|---|
109 static void | 109 static void |
110 msn_dc_destroy_packet(MsnDirectConnPacket *p) | 110 msn_dc_destroy_packet(MsnDirectConnPacket *p) |
111 { | 111 { |
112 g_free(p->data); | 112 g_free(p->data); |
113 | 113 |
114 #if 0 | |
114 if (p->msg) | 115 if (p->msg) |
115 msn_message_unref(p->msg); | 116 msn_message_unref(p->msg); |
117 #endif | |
118 if (p->part) | |
119 msn_slpmsgpart_destroy(p->part); | |
116 | 120 |
117 g_free(p); | 121 g_free(p); |
118 } | 122 } |
119 | 123 |
120 MsnDirectConn * | 124 MsnDirectConn * |
341 if (slpcall) { | 345 if (slpcall) { |
342 msn_slpcall_session_init(slpcall); | 346 msn_slpcall_session_init(slpcall); |
343 if (queue) { | 347 if (queue) { |
344 while (!g_queue_is_empty(queue)) { | 348 while (!g_queue_is_empty(queue)) { |
345 MsnDirectConnPacket *p = g_queue_pop_head(queue); | 349 MsnDirectConnPacket *p = g_queue_pop_head(queue); |
346 msn_slplink_send_msgpart(slplink, p->part); | 350 msn_slplink_send_msgpart(slplink, (MsnSlpMessage*)p->part->ack_data); |
347 msn_dc_destroy_packet(p); | 351 msn_dc_destroy_packet(p); |
348 } | 352 } |
349 g_queue_free(queue); | 353 g_queue_free(queue); |
350 } | 354 } |
351 } | 355 } |
533 } | 537 } |
534 | 538 |
535 static void | 539 static void |
536 msn_dc_send_packet_cb(MsnDirectConnPacket *p) | 540 msn_dc_send_packet_cb(MsnDirectConnPacket *p) |
537 { | 541 { |
542 if (p->part != NULL && p->part->ack_cb != NULL) | |
543 p->part->ack_cb(p->part, p->part->ack_data); | |
544 } | |
545 | |
546 #if 0 | |
547 static void | |
548 msn_dc_send_packet_cb(MsnDirectConnPacket *p) | |
549 { | |
538 if (p->msg != NULL && p->msg->ack_cb != NULL) | 550 if (p->msg != NULL && p->msg->ack_cb != NULL) |
539 p->msg->ack_cb(p->msg, p->msg->ack_data); | 551 p->msg->ack_cb(p->msg, p->msg->ack_data); |
540 } | 552 } |
541 | 553 |
542 void | 554 void |
554 p->sent_cb = msn_dc_send_packet_cb; | 566 p->sent_cb = msn_dc_send_packet_cb; |
555 p->msg = msn_message_ref(msg); | 567 p->msg = msn_message_ref(msg); |
556 | 568 |
557 msn_dc_enqueue_packet(dc, p); | 569 msn_dc_enqueue_packet(dc, p); |
558 } | 570 } |
571 #endif | |
559 | 572 |
560 void | 573 void |
561 msn_dc_enqueue_part(MsnDirectConn *dc, MsnSlpMessagePart *part) | 574 msn_dc_enqueue_part(MsnDirectConn *dc, MsnSlpMessagePart *part) |
562 { | 575 { |
563 MsnDirectConnPacket *p; | 576 MsnDirectConnPacket *p; |