Unlock our lock while we try to find the extension
authorMark Spencer <markster@digium.com>
Mon, 1 Sep 2003 00:51:30 +0000 (00:51 +0000)
committerMark Spencer <markster@digium.com>
Mon, 1 Sep 2003 00:51:30 +0000 (00:51 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1450 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 178775a..162edf0 100755 (executable)
@@ -4025,7 +4025,9 @@ retryowner:
                                        fr.callno = make_trunk(fr.callno, 1);
                                }
                                /* This might re-enter the IAX code and need the lock */
+                               ast_mutex_unlock(&iaxs[fr.callno]);
                                exists = ast_exists_extension(NULL, iaxs[fr.callno]->context, iaxs[fr.callno]->exten, 1, iaxs[fr.callno]->callerid);
+                               ast_mutex_lock(&iaxs[fr.callno]);
                                if (!strlen(iaxs[fr.callno]->secret) && !strlen(iaxs[fr.callno]->inkeys)) {
                                        if (strcmp(iaxs[fr.callno]->exten, "TBD") && !exists) {
                                                memset(&ied0, 0, sizeof(ied0));