diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-24 15:55:21 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-24 15:55:21 +0000 |
commit | feccdf1cf2f9ac389c0ebf2fbf77dcdfdb83045c (patch) | |
tree | 99d0a20e7d1eecfeae98353f50f51f92dc279a75 /channels/chan_iax2.c | |
parent | 563b3abdf5025b94323ddc43f2601c08affa3c0f (diff) |
Fix a silly mistake in a change I made yesterday that caused chan_iax2 to blow
up very quickly.
(issue #12515)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@114608 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_iax2.c')
-rw-r--r-- | channels/chan_iax2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index f30ea54f8..d44163e22 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -1353,7 +1353,7 @@ static int __find_callno(unsigned short callno, unsigned short dcallno, struct s res = x; } } - if (res && !return_locked) + if (!res || (res && !return_locked)) ast_mutex_unlock(&iaxsl[x]); } for (x=TRUNK_CALL_START;(res < 1) && (x<maxtrunkcall);x++) { @@ -1364,7 +1364,7 @@ static int __find_callno(unsigned short callno, unsigned short dcallno, struct s res = x; } } - if (res && !return_locked) + if (!res || (res && !return_locked)) ast_mutex_unlock(&iaxsl[x]); } } |