[asterisk-commits] russell: branch 1.4 r114587 - /branches/1.4/channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Apr 23 12:16:33 CDT 2008


Author: russell
Date: Wed Apr 23 12:16:32 2008
New Revision: 114587

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114587
Log:
Fix find_callno_locked() to actually return the callno locked in some more cases.

Modified:
    branches/1.4/channels/chan_iax2.c

Modified: branches/1.4/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_iax2.c?view=diff&rev=114587&r1=114586&r2=114587
==============================================================================
--- branches/1.4/channels/chan_iax2.c (original)
+++ branches/1.4/channels/chan_iax2.c Wed Apr 23 12:16:32 2008
@@ -1353,7 +1353,8 @@
 					res = x;
 				}
 			}
-			ast_mutex_unlock(&iaxsl[x]);
+			if (res && !return_locked)
+				ast_mutex_unlock(&iaxsl[x]);
 		}
 		for (x=TRUNK_CALL_START;(res < 1) && (x<maxtrunkcall);x++) {
 			ast_mutex_lock(&iaxsl[x]);
@@ -1363,7 +1364,8 @@
 					res = x;
 				}
 			}
-			ast_mutex_unlock(&iaxsl[x]);
+			if (res && !return_locked)
+				ast_mutex_unlock(&iaxsl[x]);
 		}
 	}
 	if ((res < 1) && (new >= NEW_ALLOW)) {




More information about the asterisk-commits mailing list