[asterisk-commits] bebuild: tag 1.8.23.0-rc2 r394182 - in /tags/1.8.23.0-rc2: ./ channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 12 08:37:03 CDT 2013


Author: bebuild
Date: Fri Jul 12 08:37:01 2013
New Revision: 394182

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=394182
Log:
Merge r391333 for 1.8.23.0-rc2

This patch also removes the summaries and updates the ChangeLog/version

Removed:
    tags/1.8.23.0-rc2/asterisk-1.8.23.0-rc1-summary.html
    tags/1.8.23.0-rc2/asterisk-1.8.23.0-rc1-summary.txt
Modified:
    tags/1.8.23.0-rc2/   (props changed)
    tags/1.8.23.0-rc2/.version
    tags/1.8.23.0-rc2/ChangeLog
    tags/1.8.23.0-rc2/channels/chan_iax2.c

Propchange: tags/1.8.23.0-rc2/
------------------------------------------------------------------------------
    svn:mergeinfo = /branches/1.8:391333

Modified: tags/1.8.23.0-rc2/.version
URL: http://svnview.digium.com/svn/asterisk/tags/1.8.23.0-rc2/.version?view=diff&rev=394182&r1=394181&r2=394182
==============================================================================
--- tags/1.8.23.0-rc2/.version (original)
+++ tags/1.8.23.0-rc2/.version Fri Jul 12 08:37:01 2013
@@ -1,1 +1,1 @@
-1.8.23.0-rc1
+1.8.23.0-rc2

Modified: tags/1.8.23.0-rc2/ChangeLog
URL: http://svnview.digium.com/svn/asterisk/tags/1.8.23.0-rc2/ChangeLog?view=diff&rev=394182&r1=394181&r2=394182
==============================================================================
--- tags/1.8.23.0-rc2/ChangeLog (original)
+++ tags/1.8.23.0-rc2/ChangeLog Fri Jul 12 08:37:01 2013
@@ -1,3 +1,13 @@
+2013-07-12  Asterisk Development Team <asteriskteam at digium.com>
+
+	* Asterisk 1.8.23.0-rc2 Released.
+
+	* Properly lock and safely handle a transfer failure in IAX2
+
+	  When touching the bridgecallno, we need to lock it - otherwise a
+	  race condition can occur. This patch does the proper locking
+	  of the bridgecallno before modifying its state.
+
 2013-06-10  Asterisk Development Team <asteriskteam at digium.com>
 
 	* Asterisk 1.8.23.0-rc1 Released.

Modified: tags/1.8.23.0-rc2/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/tags/1.8.23.0-rc2/channels/chan_iax2.c?view=diff&rev=394182&r1=394181&r2=394182
==============================================================================
--- tags/1.8.23.0-rc2/channels/chan_iax2.c (original)
+++ tags/1.8.23.0-rc2/channels/chan_iax2.c Fri Jul 12 08:37:01 2013
@@ -11369,15 +11369,28 @@
 				}
 				break;
 			case IAX_COMMAND_TXREJ:
-				iaxs[fr->callno]->transferring = 0;
+				if (iaxs[fr->callno]->bridgecallno) {
+					while (ast_mutex_trylock(&iaxsl[iaxs[fr->callno]->bridgecallno])) {
+						DEADLOCK_AVOIDANCE(&iaxsl[fr->callno]);
+					}
+					if (!iaxs[fr->callno]) {
+						break;
+					}
+				}
+
+				iaxs[fr->callno]->transferring = TRANSFER_NONE;
 				ast_verb(3, "Channel '%s' unable to transfer\n", iaxs[fr->callno]->owner ? iaxs[fr->callno]->owner->name : "<Unknown>");
 				memset(&iaxs[fr->callno]->transfer, 0, sizeof(iaxs[fr->callno]->transfer));
-				if (iaxs[fr->callno]->bridgecallno) {
-					if (iaxs[iaxs[fr->callno]->bridgecallno]->transferring) {
-						iaxs[iaxs[fr->callno]->bridgecallno]->transferring = 0;
-						send_command(iaxs[iaxs[fr->callno]->bridgecallno], AST_FRAME_IAX, IAX_COMMAND_TXREJ, 0, NULL, 0, -1);
-					}
+
+				if (!iaxs[fr->callno]->bridgecallno) {
+					break;
 				}
+
+				if (iaxs[iaxs[fr->callno]->bridgecallno]->transferring) {
+					iaxs[iaxs[fr->callno]->bridgecallno]->transferring = TRANSFER_NONE;
+					send_command(iaxs[iaxs[fr->callno]->bridgecallno], AST_FRAME_IAX, IAX_COMMAND_TXREJ, 0, NULL, 0, -1);
+				}
+				ast_mutex_unlock(&iaxsl[iaxs[fr->callno]->bridgecallno]);
 				break;
 			case IAX_COMMAND_TXREADY:
 				if (iaxs[fr->callno]->bridgecallno) {




More information about the asterisk-commits mailing list