[Asterisk-code-review] app_playback.c: Fix PLAYBACKSTATUS regression. (asterisk[20])

George Joseph asteriskteam at digium.com
Fri Jan 13 08:28:55 CST 2023


George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/19831 )

Change subject: app_playback.c: Fix PLAYBACKSTATUS regression.
......................................................................

app_playback.c: Fix PLAYBACKSTATUS regression.

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
---
M apps/app_playback.c
A doc/UPGRADE-staging/app_playback_playbackstatus.txt
2 files changed, 27 insertions(+), 2 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit
  N A: Looks good to me, but someone else must approve




diff --git a/apps/app_playback.c b/apps/app_playback.c
index 56c2a86..afa959b 100644
--- a/apps/app_playback.c
+++ b/apps/app_playback.c
@@ -507,8 +507,7 @@
 			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
index 0000000..49302b7
--- /dev/null
+++ b/doc/UPGRADE-staging/app_playback_playbackstatus.txt
@@ -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.

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/19831
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 20
Gerrit-Change-Id: I53f54e56b59b61c99403a481b6cb8d88b5a559ff
Gerrit-Change-Number: 19831
Gerrit-PatchSet: 2
Gerrit-Owner: Sean Bright <sean at seanbright.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: N A <asterisk at phreaknet.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230113/df1aac7b/attachment-0001.html>


More information about the asterisk-code-review mailing list