diff options
author | Russell Bryant <russell@russellbryant.com> | 2008-04-23 17:18:29 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2008-04-23 17:18:29 +0000 |
commit | 0fa42f819a059fa10988e642eee3e497c00697e7 (patch) | |
tree | 9e71f7f9f38a8f80f6623e081ab6ce7612fa94f4 /channels | |
parent | 2958831a9704b1a7d6edebbeb188baa799437914 (diff) |
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: https://origsvn.digium.com/svn/asterisk/trunk@114588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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 6bf811e20..1eb018af0 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -1507,7 +1507,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]); @@ -1517,7 +1518,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)) { |