diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-27 19:35:09 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-27 19:35:09 +0000 |
commit | cb4b934c7e544005a0ce1541ca607df71c96fff1 (patch) | |
tree | bff9ff5c58bd86a2565c3205695279da5dfd1eb1 | |
parent | a0b53a7da58f56277a57fdb1741d8151fb1a91b0 (diff) |
Playback() wasn't setting PLAYBACKSTATUS under several circumstances.
Playback() returns -1 on missing args - so should Background()
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@43800 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_playback.c | 9 | ||||
-rw-r--r-- | pbx.c | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/apps/app_playback.c b/apps/app_playback.c index ed33097ab..71c9bc743 100644 --- a/apps/app_playback.c +++ b/apps/app_playback.c @@ -110,6 +110,7 @@ static int playback_exec(struct ast_channel *chan, void *data) if (chan->_state != AST_STATE_UP) { if (option_skip) { /* At the user's option, skip if the line is not up */ + pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", "SUCCESS"); LOCAL_USER_REMOVE(u); return 0; } else if (!option_noanswer) @@ -137,11 +138,11 @@ static int playback_exec(struct ast_channel *chan, void *data) } front = back; } - if (mres) - pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", "FAILED"); - else - pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", "SUCCESS"); } + if (mres) + pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", "FAILED"); + else + pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", "SUCCESS"); LOCAL_USER_REMOVE(u); return res; } @@ -5745,7 +5745,7 @@ static int pbx_builtin_background(struct ast_channel *chan, void *data) break; default: ast_log(LOG_WARNING, "Background requires an argument (filename)\n"); - break; + return -1; } } |