diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-23 17:18:59 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-23 17:18:59 +0000 |
commit | 969bff41e8776d51066d3f66811aec649ecf2042 (patch) | |
tree | 54a16f630b7fe0b51a1ecd7e6894b51e1afbbfa1 /channels | |
parent | 973985bd8a1e8f1c33d0fd3e497c84f11b8d3385 (diff) |
Merged revisions 114588 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r114588 | russell | 2008-04-23 12:18:29 -0500 (Wed, 23 Apr 2008) | 10 lines
Merged revisions 114587 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r114587 | russell | 2008-04-23 12:16:32 -0500 (Wed, 23 Apr 2008) | 2 lines
Fix find_callno_locked() to actually return the callno locked in some more cases.
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@114589 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_iax2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 1d56843f9..404cd44a8 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -1500,7 +1500,8 @@ static int __find_callno(unsigned short callno, unsigned short dcallno, struct s 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]); @@ -1510,7 +1511,8 @@ static int __find_callno(unsigned short callno, unsigned short dcallno, struct s res = x; } } - ast_mutex_unlock(&iaxsl[x]); + if (res && !return_locked) + ast_mutex_unlock(&iaxsl[x]); } } if ((res < 1) && (new >= NEW_ALLOW)) { |