diff options
author | Russell Bryant <russell@russellbryant.com> | 2007-08-01 15:39:54 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2007-08-01 15:39:54 +0000 |
commit | 4e0947c5f1f9c9583bff9f2be1b0c2810263e3e9 (patch) | |
tree | 8669ddf483350f2bd54e6b146d9a2a5a56e9c141 /res/res_features.c | |
parent | 96b96a5f72e12a5b747aa00e542b964f7312858e (diff) |
Convert code that checks the _softhangup member of ast_channel directory to use
the ast_check_hangup() funciton. This function takes scheduled hangups into
account.
(closes issue #10230, patch by Juggie)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_features.c')
-rw-r--r-- | res/res_features.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/res/res_features.c b/res/res_features.c index 610fffa99..c90a5c523 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -854,7 +854,7 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st ast_set_flag(&(bconfig.features_caller), AST_FEATURE_DISCONNECT); ast_set_flag(&(bconfig.features_callee), AST_FEATURE_DISCONNECT); res = ast_bridge_call(transferer, newchan, &bconfig); - if (newchan->_softhangup || !transferer->_softhangup) { + if (ast_check_hangup(newchan) || !ast_check_hangup(transferer)) { ast_hangup(newchan); if (ast_stream_and_wait(transferer, xfersound, "")) ast_log(LOG_WARNING, "Failed to play transfer sound!\n"); @@ -1450,7 +1450,7 @@ static struct ast_channel *ast_feature_request_and_dial(struct ast_channel *call x = 0; started = ast_tvnow(); to = timeout; - while (!((transferee && transferee->_softhangup) && (!igncallerstate && ast_check_hangup(caller))) && timeout && (chan->_state != AST_STATE_UP)) { + while (!((transferee && ast_check_hangup(transferee)) && (!igncallerstate && ast_check_hangup(caller))) && timeout && (chan->_state != AST_STATE_UP)) { struct ast_frame *f = NULL; monitor_chans[0] = caller; @@ -1504,7 +1504,7 @@ static struct ast_channel *ast_feature_request_and_dial(struct ast_channel *call f = ast_read(caller); if (f == NULL) { /*doh! where'd he go?*/ if (!igncallerstate) { - if (caller->_softhangup && !chan->_softhangup) { + if (ast_check_hangup(caller) && !ast_check_hangup(chan)) { /* make this a blind transfer */ ready = 1; break; |