[svn-commits] tilghman: trunk r114243 - in /trunk: ./ apps/app_setcallerid.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Apr 18 01:53:48 CDT 2008


Author: tilghman
Date: Fri Apr 18 01:53:47 2008
New Revision: 114243

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114243
Log:
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:
    trunk/   (props changed)
    trunk/apps/app_setcallerid.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/apps/app_setcallerid.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_setcallerid.c?view=diff&rev=114243&r1=114242&r2=114243
==============================================================================
--- trunk/apps/app_setcallerid.c (original)
+++ trunk/apps/app_setcallerid.c Fri Apr 18 01:53:47 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 svn-commits mailing list