[asterisk-commits] main/app: Only look to end of file if ':end' is specified, a... (asterisk[13])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Aug 28 07:35:30 CDT 2017
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/6300 )
Change subject: main/app: Only look to end of file if ':end' is specified, and not just ':'
......................................................................
main/app: Only look to end of file if ':end' is specified, and not just ':'
There is a little known feature in app_controlplayback that will cause the
specified offset to be used relative to the end of a file if a ':end' is
detected within the filename.
This feature is pretty bad, but okay.
However, a bug exists in this code where a ':' detected in the filename
will cause the end pointer to be non-NULL, even if the full ':end' isn't
specified. This causes us to treat an unspecified offset (0) as being
"start playing from the end of the file", resulting in no file playback
occurring.
This patch fixes this bug by resetting the end pointer if ':end' is not
found in the filename.
ASTERISK-23608 #close
Reported by: Jonathan White
Change-Id: Ib4c7b1b45283e4effd622a970055c51146892f35
(cherry picked from commit 13efea24f7ce6ccc01d1a5a0603be2636d83a408)
---
M main/app.c
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Jenkins2: Approved for Submit
diff --git a/main/app.c b/main/app.c
index 85dc87d..8ea6f82 100644
--- a/main/app.c
+++ b/main/app.c
@@ -1113,6 +1113,8 @@
if (!strcasecmp(end, ":end")) {
*end = '\0';
end++;
+ } else {
+ end = NULL;
}
}
--
To view, visit https://gerrit.asterisk.org/6300
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4c7b1b45283e4effd622a970055c51146892f35
Gerrit-Change-Number: 6300
Gerrit-PatchSet: 3
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170828/d70e28c7/attachment-0001.html>
More information about the asterisk-commits
mailing list