aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_local.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-12 15:37:30 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-12 15:37:30 +0000
commit94226ca1dcf434713ced52e74002927dd53ed2fb (patch)
tree4150e6da4fdbdf4c1e2b9b5a73756cb8df77c635 /channels/chan_local.c
parentbecbe9d01aeeb0169f6b37d9e84b0df9b2214823 (diff)
Fix some bad locking stemming from trying to forward a call to a non-existent
extension from a queue. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@200326 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_local.c')
-rw-r--r--channels/chan_local.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c
index 5eba90f4b..329b9828e 100644
--- a/channels/chan_local.c
+++ b/channels/chan_local.c
@@ -571,6 +571,8 @@ start_over:
*/
if (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;
}
}
@@ -578,6 +580,8 @@ start_over:
if (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;
}
}
@@ -595,6 +599,7 @@ start_over:
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_mutex_unlock(&p->lock);
+ ast_channel_unlock(p->chan);
return -1;
}