[asterisk-commits] trunk r17726 - in /trunk: ./ pbx.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Apr 5 13:05:11 MST 2006
Author: file
Date: Wed Apr 5 15:05:09 2006
New Revision: 17726
URL: http://svn.digium.com/view/asterisk?rev=17726&view=rev
Log:
Merged revisions 17702 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r17702 | file | 2006-04-05 17:01:19 -0300 (Wed, 05 Apr 2006) | 2 lines
Unlock channel on failure so that ast_mutex_destroy doesn't throw a fit (issue #6647 reported by casper)
........
Modified:
trunk/ (props changed)
trunk/pbx.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Modified: trunk/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx.c?rev=17726&r1=17725&r2=17726&view=diff
==============================================================================
--- trunk/pbx.c (original)
+++ trunk/pbx.c Wed Apr 5 15:05:09 2006
@@ -4704,8 +4704,10 @@
} else {
if (ast_pbx_start(chan)) {
ast_log(LOG_ERROR, "Unable to start PBX on %s\n", chan->name);
- if (channel)
+ if (channel) {
*channel = NULL;
+ ast_mutex_unlock(&chan->lock);
+ }
ast_hangup(chan);
res = -1;
}
@@ -4721,13 +4723,15 @@
ast_cdr_failed(chan->cdr);
}
- if (channel)
+ if (channel) {
*channel = NULL;
+ ast_mutex_unlock(&chan->lock);
+ }
ast_hangup(chan);
}
}
- if(res < 0) { /* the call failed for some reason */
+ if (res < 0) { /* the call failed for some reason */
if (*reason == 0) { /* if the call failed (not busy or no answer)
* update the cdr with the failed message */
cdr_res = ast_pbx_outgoing_cdr_failed();
@@ -4783,8 +4787,10 @@
if (ast_pthread_create(&as->p, &attr, async_wait, as)) {
ast_log(LOG_WARNING, "Failed to start async wait\n");
free(as);
- if (channel)
+ if (channel) {
*channel = NULL;
+ ast_mutex_unlock(&chan->lock);
+ }
ast_hangup(chan);
res = -1;
goto outgoing_exten_cleanup;
More information about the asterisk-commits
mailing list