[asterisk-commits] oej: branch oej/pinerana-lock-mwipvt-trunk r332443 - /team/oej/pinerana-lock-...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Aug 18 06:21:33 CDT 2011
Author: oej
Date: Thu Aug 18 06:21:29 2011
New Revision: 332443
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=332443
Log:
Lock the peer->mwipvt.
ASTERISK-18288
Modified:
team/oej/pinerana-lock-mwipvt-trunk/channels/chan_sip.c
Modified: team/oej/pinerana-lock-mwipvt-trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinerana-lock-mwipvt-trunk/channels/chan_sip.c?view=diff&rev=332443&r1=332442&r2=332443
==============================================================================
--- team/oej/pinerana-lock-mwipvt-trunk/channels/chan_sip.c (original)
+++ team/oej/pinerana-lock-mwipvt-trunk/channels/chan_sip.c Thu Aug 18 06:21:29 2011
@@ -25658,11 +25658,16 @@
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
}
+ /* We have multiple threads (mwi events and monitor retransmits) working with this PVT and as we modify the sip history if that's turned on,
+ we really need to have a lock on it */
+ sip_pvt_lock(p);
+
/* Send MWI */
ast_set_flag(&p->flags[0], SIP_OUTGOING);
/* the following will decrement the refcount on p as it finishes */
transmit_notify_with_mwi(p, newmsgs, oldmsgs, peer->vmexten);
dialog_unref(p, "unref dialog ptr p just before it goes out of scope at the end of sip_send_mwi_to_peer.");
+ sip_pvt_unlock(p);
return 0;
}
More information about the asterisk-commits
mailing list