pidgin: b720fa48: Re-order msg_ack, since purple_xfer_prpl...

qulogic at pidgin.im qulogic at pidgin.im
Sun Feb 28 03:35:29 EST 2010


-----------------------------------------------------------------
Revision: b720fa4847a76b6b396861200c0abd6d2d90d4be
Ancestor: 8587687655d4e11f0965358e8a4378cfa3d1e4e7
Author: qulogic at pidgin.im
Date: 2010-02-28T06:46:32
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/b720fa4847a76b6b396861200c0abd6d2d90d4be

Modified files:
        libpurple/protocols/msn/slplink.c

ChangeLog: 

Re-order msg_ack, since purple_xfer_prpl_ready might cancel the transfer
and free some pointers. At least, I think that's what valgrind says.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/slplink.c	42477d0a16d37a8c1e662dc4218afad270649fad
+++ libpurple/protocols/msn/slplink.c	d4aefb42cb2a3334a2dda05c1e016848f7484141
@@ -307,6 +307,8 @@ msg_ack(MsnMessage *msg, void *data)
 
 	slpmsg->offset += msg->msnslp_header.length;
 
+	slpmsg->msgs = g_list_remove(slpmsg->msgs, msg);
+
 	if (slpmsg->offset < real_size)
 	{
 		if (slpmsg->slpcall->xfer && purple_xfer_get_status(slpmsg->slpcall->xfer) == PURPLE_XFER_STATUS_STARTED)
@@ -331,8 +333,6 @@ msg_ack(MsnMessage *msg, void *data)
 			}
 		}
 	}
-
-	slpmsg->msgs = g_list_remove(slpmsg->msgs, msg);
 }
 
 /* We have received the message nak. */


More information about the Commits mailing list