[asterisk-bugs] [Asterisk 0015208]: [patch] The CUT function does not show the leading field-separators until it finds a value.
Asterisk Bug Tracker
noreply at bugs.digium.com
Wed May 27 13:47:27 CDT 2009
The following issue has been UPDATED.
======================================================================
https://issues.asterisk.org/view.php?id=15208
======================================================================
Reported By: ramonpeek
Assigned To: tilghman
======================================================================
Project: Asterisk
Issue ID: 15208
Category: Functions/func_cut
Reproducibility: sometimes
Severity: minor
Priority: normal
Status: assigned
Asterisk Version: 1.4.25
Regression: No
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2009-05-27 13:47 CDT
Last Modified: 2009-05-27 13:47 CDT
======================================================================
Summary: [patch] The CUT function does not show the leading
field-separators until it finds a value.
Description:
The CUT function does not show the leading field-separators if the first
values are NULL and will start functioning normal if it does find a value.
For example:
1 - ${CUT(1---4-5-6--8--,,1-5)} results in: 1---4-5 (CORRECT)
2 - ${CUT(1---4-5-6--8--,,6-10)} results in: 6--8-- (CORRECT)
3 - ${CUT(1---4-5-6--8--,,2-10)} results in: 4-5-6--8-- (INCORRECT!,
should be: --4-5-6--8--)
In second and third statement the TRAILING separators are shown.
However the third statement should also show the LEADING separators, which
it doesn't.
I've added a small dialplan example to test.
And uploaded a patch I created for latest func_cut.c for Asterisk 1.4
trunk.
The patch should also work on 1.6.2 (with offset) since this part has not
been changed since.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2009-05-27 13:47 ramonpeek Summary The CUT function does
not show the leading field-separators until it finds a value. => [patch] The CUT
function does not show the leading field-separators until it finds a value.
======================================================================
More information about the asterisk-bugs
mailing list