mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 00:04:53 +00:00
Fix some bad locking stemming from trying to forward a call to a non-existent
extension from a queue. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3178,11 +3178,13 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
|
|||||||
|
|
||||||
if (ast_call(o->chan, tmpchan, 0)) {
|
if (ast_call(o->chan, tmpchan, 0)) {
|
||||||
ast_log(LOG_NOTICE, "Failed to dial on local channel for call forward to '%s'\n", tmpchan);
|
ast_log(LOG_NOTICE, "Failed to dial on local channel for call forward to '%s'\n", tmpchan);
|
||||||
|
ast_channel_unlock(o->chan);
|
||||||
do_hang(o);
|
do_hang(o);
|
||||||
numnochan++;
|
numnochan++;
|
||||||
|
} else {
|
||||||
|
ast_channel_unlock(o->chan);
|
||||||
}
|
}
|
||||||
ast_channel_unlock(in);
|
ast_channel_unlock(in);
|
||||||
ast_channel_unlock(o->chan);
|
|
||||||
}
|
}
|
||||||
/* Hangup the original channel now, in case we needed it */
|
/* Hangup the original channel now, in case we needed it */
|
||||||
ast_hangup(winner);
|
ast_hangup(winner);
|
||||||
|
@@ -571,6 +571,8 @@ start_over:
|
|||||||
*/
|
*/
|
||||||
if (p->owner->cid.cid_rdnis) {
|
if (p->owner->cid.cid_rdnis) {
|
||||||
if (!(p->chan->cid.cid_rdnis = ast_strdup(p->owner->cid.cid_rdnis))) {
|
if (!(p->chan->cid.cid_rdnis = ast_strdup(p->owner->cid.cid_rdnis))) {
|
||||||
|
ast_mutex_unlock(&p->lock);
|
||||||
|
ast_channel_unlock(p->chan);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -578,6 +580,8 @@ start_over:
|
|||||||
|
|
||||||
if (p->owner->cid.cid_dnid) {
|
if (p->owner->cid.cid_dnid) {
|
||||||
if (!(p->chan->cid.cid_dnid = ast_strdup(p->owner->cid.cid_dnid))) {
|
if (!(p->chan->cid.cid_dnid = ast_strdup(p->owner->cid.cid_dnid))) {
|
||||||
|
ast_mutex_unlock(&p->lock);
|
||||||
|
ast_channel_unlock(p->chan);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -595,6 +599,7 @@ start_over:
|
|||||||
if (!ast_exists_extension(NULL, p->chan->context, p->chan->exten, 1, p->owner->cid.cid_num)) {
|
if (!ast_exists_extension(NULL, p->chan->context, p->chan->exten, 1, p->owner->cid.cid_num)) {
|
||||||
ast_log(LOG_NOTICE, "No such extension/context %s@%s while calling Local channel\n", p->chan->exten, p->chan->context);
|
ast_log(LOG_NOTICE, "No such extension/context %s@%s while calling Local channel\n", p->chan->exten, p->chan->context);
|
||||||
ast_mutex_unlock(&p->lock);
|
ast_mutex_unlock(&p->lock);
|
||||||
|
ast_channel_unlock(p->chan);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user