]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_playback.c: Fix PLAYBACKSTATUS regression.
authorSean Bright <sean@seanbright.com>
Thu, 5 Jan 2023 16:41:37 +0000 (11:41 -0500)
committerGeorge Joseph <gjoseph@digium.com>
Fri, 13 Jan 2023 14:28:51 +0000 (08:28 -0600)
In Asterisk 11, if a channel was redirected away during Playback(),
the PLAYBACKSTATUS variable would be set to SUCCESS. In Asterisk 12
(specifically commit 7d9871b3940fa50e85039aef6a8fb9870a7615b9) that
behavior was inadvertently changed and the same operation would result
in the PLAYBACKSTATUS variable being set to FAILED. The Asterisk 11
behavior has been restored.

Partial fix for ASTERISK~25661.

Change-Id: I53f54e56b59b61c99403a481b6cb8d88b5a559ff

apps/app_playback.c
doc/UPGRADE-staging/app_playback_playbackstatus.txt [new file with mode: 0644]

index 56c2a86682fef2d737466f6f84f0400a935de8f3..afa959be00582553b94d868f86b29ae6c4f1347a 100644 (file)
@@ -507,8 +507,7 @@ static int playback_exec(struct ast_channel *chan, const char *data)
                        if (!res) {
                                res = ast_waitstream(chan, "");
                                ast_stopstream(chan);
-                       }
-                       if (res) {
+                       } else {
                                if (!ast_check_hangup(chan)) {
                                        ast_log(LOG_WARNING, "Playback failed on %s for %s\n", ast_channel_name(chan), (char *)data);
                                }
diff --git a/doc/UPGRADE-staging/app_playback_playbackstatus.txt b/doc/UPGRADE-staging/app_playback_playbackstatus.txt
new file mode 100644 (file)
index 0000000..49302b7
--- /dev/null
@@ -0,0 +1,8 @@
+Subject: app_playback
+
+In Asterisk 11, if a channel was redirected away during Playback(),
+the PLAYBACKSTATUS variable would be set to SUCCESS. In Asterisk 12
+(specifically commit 7d9871b3940fa50e85039aef6a8fb9870a7615b9) that
+behavior was inadvertently changed and the same operation would result
+in the PLAYBACKSTATUS variable being set to FAILED. The Asterisk 11
+behavior has been restored.