[asterisk-commits] branch oej/stopshrinkinguris r16393 - in
/team/oej/stopshrinkinguris: ./ incl...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Mar 29 20:53:50 MST 2006
Author: oej
Date: Wed Mar 29 21:53:50 2006
New Revision: 16393
URL: http://svn.digium.com/view/asterisk?rev=16393&view=rev
Log:
Constify functions
Modified:
team/oej/stopshrinkinguris/callerid.c
team/oej/stopshrinkinguris/include/asterisk/callerid.h
Modified: team/oej/stopshrinkinguris/callerid.c
URL: http://svn.digium.com/view/asterisk/team/oej/stopshrinkinguris/callerid.c?rev=16393&r1=16392&r2=16393&view=diff
==============================================================================
--- team/oej/stopshrinkinguris/callerid.c (original)
+++ team/oej/stopshrinkinguris/callerid.c Wed Mar 29 21:53:50 2006
@@ -910,7 +910,7 @@
\param valid Valid characters in string
\return 1 if valid string, 0 if string contains invalid characters
*/
-static int ast_is_valid_string(char *exten, char *valid)
+static int ast_is_valid_string(char *exten, const char *valid)
{
int x;
@@ -926,7 +926,7 @@
\return 1 if string is valid AST phone number
\return 0 if not
*/
-int ast_isphonenumber(char *n)
+int ast_isphonenumber(const char *n)
{
return ast_is_valid_string(n, "0123456789*#+");
}
@@ -936,7 +936,7 @@
\return 1 if string is valid AST shrinkable phone number
\return 0 if not
*/
-int ast_is_shrinkable_phonenumber(char *exten)
+int ast_is_shrinkable_phonenumber(const char *exten)
{
return ast_is_valid_string(exten, "0123456789*#+()-.");
}
Modified: team/oej/stopshrinkinguris/include/asterisk/callerid.h
URL: http://svn.digium.com/view/asterisk/team/oej/stopshrinkinguris/include/asterisk/callerid.h?rev=16393&r1=16392&r2=16393&view=diff
==============================================================================
--- team/oej/stopshrinkinguris/include/asterisk/callerid.h (original)
+++ team/oej/stopshrinkinguris/include/asterisk/callerid.h Wed Mar 29 21:53:50 2006
@@ -197,14 +197,14 @@
\param n number to be checked.
\return Returns 0 if n is a number, 1 if it's not.
*/
-extern int ast_isphonenumber(char *n);
+extern int ast_isphonenumber(const char *n);
/*! \brief Check if a string consists only of digits and and + \# ( ) - .
(meaning it can be cleaned with ast_shrink_phone_number)
\param exten The extension (or URI) to be checked.
\return Returns 0 if n is a number, 1 if it's not.
*/
-extern int ast_is_shrinkable_phonenumber(char *exten);
+extern int ast_is_shrinkable_phonenumber(const char *exten);
extern int ast_callerid_split(const char *src, char *name, int namelen, char *num, int numlen);
More information about the asterisk-commits
mailing list