pidgin: 3aed0cc8: Call msn_transaction_destroy from msn_cm...
qulogic at pidgin.im
qulogic at pidgin.im
Sat Nov 27 03:46:08 EST 2010
----------------------------------------------------------------------
Revision: 3aed0cc8ca0bf1d5c7b132bf4081d51d72a78546
Parent: 97dcbb6d8f599b406a299e7e99cd61818a5c023d
Author: qulogic at pidgin.im
Date: 11/27/10 02:08:24
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/3aed0cc8ca0bf1d5c7b132bf4081d51d72a78546
Changelog:
Call msn_transaction_destroy from msn_cmdproc_send_trans. This way, it
always owns in some way the transaction after being called.
Changes against parent 97dcbb6d8f599b406a299e7e99cd61818a5c023d
patched libpurple/protocols/msn/cmdproc.c
patched libpurple/protocols/msn/msn.c
patched libpurple/protocols/msn/notification.c
patched libpurple/protocols/msn/switchboard.c
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/msn.c 5f8a7aefc43c2148c3cca59097a3914518a2d8d1
+++ libpurple/protocols/msn/msn.c f27a3e5c3f33506a632fd969231ca755bf7d538e
@@ -2100,7 +2100,6 @@ msn_keepalive(PurpleConnection *gc)
trans = msn_transaction_new(cmdproc, "PNG", NULL);
msn_transaction_set_saveable(trans, FALSE);
msn_cmdproc_send_trans(cmdproc, trans);
- msn_transaction_destroy(trans);
}
}
============================================================
--- libpurple/protocols/msn/switchboard.c dc4011278d3b71546ed501d3e651fa7af5e16457
+++ libpurple/protocols/msn/switchboard.c 0c793bb433871df2f0988e0d6dfd7762a59dc4b4
@@ -1147,7 +1147,6 @@ msn_switchboard_close(MsnSwitchBoard *sw
trans = msn_transaction_new(cmdproc, "OUT", NULL);
msn_transaction_set_saveable(trans, FALSE);
msn_cmdproc_send_trans(cmdproc, trans);
- msn_transaction_destroy(trans);
msn_switchboard_destroy(swboard);
}
============================================================
--- libpurple/protocols/msn/notification.c 1f205280a81a547dbfba11dcdfa69a5b959c8884
+++ libpurple/protocols/msn/notification.c 99fbe2dcbd72111badcce772ef6775b3d8c6b453
@@ -309,7 +309,6 @@ msn_notification_close(MsnNotification *
trans = msn_transaction_new(notification->cmdproc, "OUT", NULL);
msn_transaction_set_saveable(trans, FALSE);
msn_cmdproc_send_trans(notification->cmdproc, trans);
- msn_transaction_destroy(trans);
msn_notification_disconnect(notification);
}
============================================================
--- libpurple/protocols/msn/cmdproc.c 40a2a568d5ceefbdaa79dd8e18a753df3a7929f8
+++ libpurple/protocols/msn/cmdproc.c ec542c21b85fb7fa7536ddcb2474663c2beed301
@@ -122,7 +122,7 @@ msn_cmdproc_send_trans(MsnCmdProc *cmdpr
servconn = cmdproc->servconn;
if (!servconn->connected) {
- /* TODO: Need to free trans */
+ msn_transaction_destroy(trans);
return;
}
@@ -156,6 +156,8 @@ msn_cmdproc_send_trans(MsnCmdProc *cmdpr
msn_servconn_write(servconn, data, len);
+ if (!trans->saveable)
+ msn_transaction_destroy(trans);
g_free(data);
}
More information about the Commits
mailing list