aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
authorroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-27 03:04:02 +0000
committerroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-27 03:04:02 +0000
commit082031115e1d6e5708c94a4de6761c1bd8c5e75a (patch)
treec92e9ffa37bb71b8b6777623f2d099fc27592e39 /channel.c
parent0d6770e310acc6e51a35890accdc524bd4df8197 (diff)
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@11275 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 5aacefd21..011bdaef3 100644
--- a/channel.c
+++ b/channel.c
@@ -2392,7 +2392,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 */