summaryrefslogtreecommitdiff
path: root/apps/app_dial.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r--apps/app_dial.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 772c14910..439fafa11 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1959,7 +1959,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
autoloopflag = ast_test_flag(peer, AST_FLAG_IN_AUTOLOOP); /* save value to restore at the end */
ast_set_flag(peer, AST_FLAG_IN_AUTOLOOP);
- while ((res = ast_spawn_extension(peer, peer->context, peer->exten, peer->priority, peer->cid.cid_num, &found, 1)))
+ while ((res = ast_spawn_extension(peer, peer->context, peer->exten, peer->priority, peer->cid.cid_num, &found, 1)) == 0)
peer->priority++;
if (found && res) {