[asterisk-commits] tilghman: branch 1.6.0 r114244 - in /branches/1.6.0: ./ apps/app_setcallerid.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Apr 18 01:54:40 CDT 2008
Author: tilghman
Date: Fri Apr 18 01:54:39 2008
New Revision: 114244
URL: http://svn.digium.com/view/asterisk?view=rev&rev=114244
Log:
Merged revisions 114243 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r114243 | tilghman | 2008-04-18 01:53:47 -0500 (Fri, 18 Apr 2008) | 11 lines
Merged revisions 114242 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r114242 | tilghman | 2008-04-18 01:49:16 -0500 (Fri, 18 Apr 2008) | 3 lines
For consistency sake, ensure that the values that ${CALLINGPRES} returns are valid as an
input to SetCallingPres. (Closes issue #12472)
........
................
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/apps/app_setcallerid.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/apps/app_setcallerid.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/apps/app_setcallerid.c?view=diff&rev=114244&r1=114243&r2=114244
==============================================================================
--- branches/1.6.0/apps/app_setcallerid.c (original)
+++ branches/1.6.0/apps/app_setcallerid.c Fri Apr 18 01:54:39 2008
@@ -68,7 +68,11 @@
deprecated = 1;
ast_log(LOG_WARNING, "SetCallerPres is deprecated. Please use Set(CALLERPRES()=%s) instead.\n", (char *)data);
}
- pres = ast_parse_caller_presentation(data);
+
+ /* For interface consistency, permit the argument to be specified as a number */
+ if (sscanf(data, "%d", &pres) != 1 || pres < 0 || pres > 255 || (pres & 0x9c)) {
+ pres = ast_parse_caller_presentation(data);
+ }
if (pres < 0) {
ast_log(LOG_WARNING, "'%s' is not a valid presentation (see 'show application SetCallerPres')\n",
More information about the asterisk-commits
mailing list