]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Wed, 27 Sep 2006 20:01:41 +0000 (20:01 +0000)
committerAutomerge script <automerge@asterisk.org>
Wed, 27 Sep 2006 20:01:41 +0000 (20:01 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43813 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_playback.c
pbx.c

index ed33097ab3c846b03bc8d74c20634c92ee4ea221..71c9bc743cd277484ed5747543d5205f23ef7850 100644 (file)
@@ -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;
 }
diff --git a/pbx.c b/pbx.c
index cfa93195ef75bbdc2e31f7fdb272e91a149119e2..f48e6b27a67464f1bc5b69f443beae91128bf7a5 100644 (file)
--- a/pbx.c
+++ b/pbx.c
@@ -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;
                }
        }