[asterisk-commits] mmichelson: trunk r200326 - in /trunk: apps/app_queue.c channels/chan_local.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jun 12 10:37:33 CDT 2009
Author: mmichelson
Date: Fri Jun 12 10:37:30 2009
New Revision: 200326
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=200326
Log:
Fix some bad locking stemming from trying to forward a call to a non-existent
extension from a queue.
Modified:
trunk/apps/app_queue.c
trunk/channels/chan_local.c
Modified: trunk/apps/app_queue.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_queue.c?view=diff&rev=200326&r1=200325&r2=200326
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Fri Jun 12 10:37:30 2009
@@ -3178,11 +3178,13 @@
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_channel_unlock(o->chan);
do_hang(o);
numnochan++;
+ } else {
+ ast_channel_unlock(o->chan);
}
ast_channel_unlock(in);
- ast_channel_unlock(o->chan);
}
/* Hangup the original channel now, in case we needed it */
ast_hangup(winner);
Modified: trunk/channels/chan_local.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_local.c?view=diff&rev=200326&r1=200325&r2=200326
==============================================================================
--- trunk/channels/chan_local.c (original)
+++ trunk/channels/chan_local.c Fri Jun 12 10:37:30 2009
@@ -571,6 +571,8 @@
*/
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 @@
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 @@
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;
}
More information about the asterisk-commits
mailing list