aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-27 02:51:03 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-27 02:51:03 +0000
commit42589609fa66bb5f01074bc65ad1c5324e602e04 (patch)
tree30cd34ea7be33afc01ddca2521255c39d8be3eb4 /channel.c
parent4e4547c7119075850829901e949c5be5a1a202f8 (diff)
Merged revisions 11250 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r11250 | russell | 2006-02-26 21:50:09 -0500 (Sun, 26 Feb 2006) | 2 lines don't hang up the channel if its state is set to UP before we return from ast_call (issue #6569) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@11251 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rw-r--r--channel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/channel.c b/channel.c
index 72bf9ae8d..14c15a0fe 100644
--- a/channel.c
+++ b/channel.c
@@ -2437,7 +2437,8 @@ struct ast_channel *__ast_request_and_dial(const char *type, int format, void *d
ast_set_callerid(chan, cid_num, cid_name, cid_num);
if (!ast_call(chan, data, 0)) {
- while(timeout && (chan->_state != AST_STATE_UP)) {
+ res = 1; /* in case chan->_state is already AST_STATE_UP */
+ while (timeout && (chan->_state != AST_STATE_UP)) {
res = ast_waitfor(chan, timeout);
if (res < 0) {
/* Something not cool, or timed out */