[asterisk-commits] rizzo: branch rizzo/astobj2 r47263 -
/team/rizzo/astobj2/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Nov 7 08:20:11 MST 2006
Author: rizzo
Date: Tue Nov 7 09:20:11 2006
New Revision: 47263
URL: http://svn.digium.com/view/asterisk?rev=47263&view=rev
Log:
confirm that this is a race condition that should be removed.
Modified:
team/rizzo/astobj2/channels/chan_sip.c
Modified: team/rizzo/astobj2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/channels/chan_sip.c?rev=47263&r1=47262&r2=47263&view=diff
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Tue Nov 7 09:20:11 2006
@@ -1962,7 +1962,10 @@
pkt->retransid = -1;
if (ast_test_flag(pkt, FLAG_FATAL)) {
- lock_pvt_and_owner(pkt->owner, 0 /* try forever */); /* XXX unsafe ? */
+ /* the next call is unsafe, because we are called without dialoglock held,
+ * and pkt->owner could disappear while we unlock it
+ */
+ lock_pvt_and_owner(pkt->owner, 0 /* try forever */);
if (pkt->owner->owner) {
ast_set_flag(&pkt->owner->flags[0], SIP_ALREADYGONE);
ast_log(LOG_WARNING, "Hanging up call %s - no reply to our critical packet.\n", pkt->owner->callid);
More information about the asterisk-commits
mailing list