[asterisk-commits] russell: trunk r69070 - in /trunk: ./
channels/chan_iax2.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Jun 13 09:29:46 MST 2007
Author: russell
Date: Wed Jun 13 11:29:45 2007
New Revision: 69070
URL: http://svn.digium.com/view/asterisk?view=rev&rev=69070
Log:
Merged revisions 69069 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r69069 | russell | 2007-06-13 11:29:12 -0500 (Wed, 13 Jun 2007) | 3 lines
Fix a place where a chan_iax2 pvt struct was accessed without the lock held.
This issue was reported to me via email by Dmitry Mishchenko. Thanks!
........
Modified:
trunk/ (props changed)
trunk/channels/chan_iax2.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=69070&r1=69069&r2=69070
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Wed Jun 13 11:29:45 2007
@@ -7203,11 +7203,18 @@
ast_log(LOG_NOTICE, "Rejected connect attempt from %s, who was trying to reach '%s@%s'\n", ast_inet_ntoa(sin.sin_addr), iaxs[fr->callno]->exten, iaxs[fr->callno]->context);
break;
}
- /* This might re-enter the IAX code and need the lock */
if (strcasecmp(iaxs[fr->callno]->exten, "TBD")) {
+ const char *context, *exten, *cid_num;
+
+ context = ast_strdupa(iaxs[fr->callno]->context);
+ exten = ast_strdupa(iaxs[fr->callno]->exten);
+ cid_num = ast_strdupa(iaxs[fr->callno]->cid_num);
+
+ /* This might re-enter the IAX code and need the lock */
ast_mutex_unlock(&iaxsl[fr->callno]);
- exists = ast_exists_extension(NULL, iaxs[fr->callno]->context, iaxs[fr->callno]->exten, 1, iaxs[fr->callno]->cid_num);
+ exists = ast_exists_extension(NULL, context, exten, 1, cid_num);
ast_mutex_lock(&iaxsl[fr->callno]);
+
if (!iaxs[fr->callno]) {
ast_mutex_unlock(&iaxsl[fr->callno]);
return 1;
More information about the asterisk-commits
mailing list