diff options
author | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-05 20:06:32 +0000 |
---|---|---|
committer | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-05 20:06:32 +0000 |
commit | 90bf627c0bc5a0c257d9447fb8008465945f28a6 (patch) | |
tree | 0f30d328e9c030775542a4266dd13f0b4e782759 /pbx.c | |
parent | 85d62c456d9f6d349abfe460a5c5c68a2a2595c4 (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@17734 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rw-r--r-- | pbx.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -5025,8 +5025,10 @@ int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout } 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; } @@ -5042,13 +5044,15 @@ int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout 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(); @@ -5107,8 +5111,10 @@ int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout 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; |