Mercurial > pidgin
changeset 28797:dc7b50d09922
Don't sent an ACK to a SLP message if the SlpCall has been marked as wasted
by lower code.
Fixes #6523.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Mon, 14 Dec 2009 05:45:50 +0000 |
parents | 5d8867f11f0d |
children | b14b1737af08 |
files | ChangeLog libpurple/protocols/msn/slplink.c |
diffstat | 2 files changed, 28 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Dec 14 05:42:16 2009 +0000 +++ b/ChangeLog Mon Dec 14 05:45:50 2009 +0000 @@ -8,6 +8,10 @@ * Messages from some mobile clients are no longer displayed as Chinese characters (broken in 2.6.4) + MSN: + * File transfer requests will no longer cause a crash if you delete the file + before the other side accepts. + XMPP: * Added support for the SCRAM-SHA-1 SASL mechanism. This is only available when built without Cyrus SASL support.
--- a/libpurple/protocols/msn/slplink.c Mon Dec 14 05:42:16 2009 +0000 +++ b/libpurple/protocols/msn/slplink.c Mon Dec 14 05:45:50 2009 +0000 @@ -624,30 +624,37 @@ slpcall = msn_slp_process_msg(slplink, slpmsg); - if (slpmsg->flags == 0x100) - { - MsnDirectConn *directconn; + if (slpcall == NULL) { + msn_slpmsg_destroy(slpmsg); + return; + } - directconn = slplink->directconn; + if (!slpcall->wasted) { + if (slpmsg->flags == 0x100) + { + MsnDirectConn *directconn; + + directconn = slplink->directconn; #if 0 - if (!directconn->acked) - msn_directconn_send_handshake(directconn); + if (!directconn->acked) + msn_directconn_send_handshake(directconn); #endif - } - else if (slpmsg->flags == 0x00 || slpmsg->flags == 0x1000000 || - slpmsg->flags == 0x20 || slpmsg->flags == 0x1000020 || - slpmsg->flags == 0x1000030) - { - /* Release all the messages and send the ACK */ + } + else if (slpmsg->flags == 0x00 || slpmsg->flags == 0x1000000 || + slpmsg->flags == 0x20 || slpmsg->flags == 0x1000020 || + slpmsg->flags == 0x1000030) + { + /* Release all the messages and send the ACK */ - msn_slplink_send_ack(slplink, msg); - msn_slplink_send_queued_slpmsgs(slplink); + msn_slplink_send_ack(slplink, msg); + msn_slplink_send_queued_slpmsgs(slplink); + } + + } else { + msn_slpcall_destroy(slpcall); } msn_slpmsg_destroy(slpmsg); - - if (slpcall != NULL && slpcall->wasted) - msn_slpcall_destroy(slpcall); } }