diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-03-05 14:23:22 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-03-05 14:23:22 +0000 |
commit | 581594670c77a41ee96f6b4bd200c5cec36eff5b (patch) | |
tree | 917cfbc4acf0ecf17778a3139281f32c56fd170d /apps/app_agi.c | |
parent | 9fb2b091371a64fd666c2769e2b40c8f4ede01b5 (diff) |
Bail an AGI on PBX_KEEPALIVE being set in an exec.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2344 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_agi.c')
-rwxr-xr-x | apps/app_agi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/app_agi.c b/apps/app_agi.c index 2a786ac8f..c30fd5be2 100755 --- a/apps/app_agi.c +++ b/apps/app_agi.c @@ -1248,6 +1248,10 @@ static int agi_handle_command(struct ast_channel *chan, AGI *agi, char *buf) fdprintf(agi->fd, c->usage); fdprintf(agi->fd, "520 End of proper usage.\n"); break; + case AST_PBX_KEEPALIVE: + /* We've been asked to keep alive, so do so */ + return AST_PBX_KEEPALIVE; + break; case RESULT_FAILURE: /* They've already given the failure. We've been hung up on so handle this appropriately */ @@ -1316,7 +1320,7 @@ static int run_agi(struct ast_channel *chan, char *request, AGI *agi, int pid, i returnstatus |= agi_handle_command(chan, agi, buf); /* If the handle_command returns -1, we need to stop */ - if (returnstatus < 0) { + if ((returnstatus < 0) || (returnstatus == AST_PBX_KEEPALIVE)) { break; } } else { |