[asterisk-commits] kpfleming: trunk r49741 - in /trunk: channels/ funcs/ include/asterisk/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Jan 5 17:13:35 MST 2007


Author: kpfleming
Date: Fri Jan  5 18:13:33 2007
New Revision: 49741

URL: http://svn.digium.com/view/asterisk?view=rev&rev=49741
Log:
finish const-ifying ast_func_read()

Modified:
    trunk/channels/chan_zap.c
    trunk/funcs/func_base64.c
    trunk/funcs/func_blacklist.c
    trunk/funcs/func_callerid.c
    trunk/funcs/func_cdr.c
    trunk/funcs/func_channel.c
    trunk/funcs/func_curl.c
    trunk/funcs/func_cut.c
    trunk/funcs/func_db.c
    trunk/funcs/func_enum.c
    trunk/funcs/func_env.c
    trunk/funcs/func_global.c
    trunk/funcs/func_groupcount.c
    trunk/funcs/func_logic.c
    trunk/funcs/func_math.c
    trunk/funcs/func_md5.c
    trunk/funcs/func_module.c
    trunk/funcs/func_odbc.c
    trunk/funcs/func_rand.c
    trunk/funcs/func_realtime.c
    trunk/funcs/func_sha1.c
    trunk/funcs/func_strings.c
    trunk/funcs/func_timeout.c
    trunk/funcs/func_uri.c
    trunk/funcs/func_version.c
    trunk/funcs/func_vmcount.c
    trunk/include/asterisk/channel.h

Modified: trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_zap.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/channels/chan_zap.c (original)
+++ trunk/channels/chan_zap.c Fri Jan  5 18:13:33 2007
@@ -763,7 +763,7 @@
 static int zt_indicate(struct ast_channel *chan, int condition, const void *data, size_t datalen);
 static int zt_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
 static int zt_setoption(struct ast_channel *chan, int option, void *data, int datalen);
-static int zt_func_read(struct ast_channel *chan, char *function, char *data, char *buf, size_t len); 
+static int zt_func_read(struct ast_channel *chan, const char *function, char *data, char *buf, size_t len);
 
 static const struct ast_channel_tech zap_tech = {
 	.type = "Zap",
@@ -3249,7 +3249,7 @@
 	return 0;
 }
 
-static int zt_func_read(struct ast_channel *chan, char *function, char *data, char *buf, size_t len)
+static int zt_func_read(struct ast_channel *chan, const char *function, char *data, char *buf, size_t len)
 {
 	struct zt_pvt *p = chan->tech_pvt;
 	

Modified: trunk/funcs/func_base64.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_base64.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_base64.c (original)
+++ trunk/funcs/func_base64.c Fri Jan  5 18:13:33 2007
@@ -37,7 +37,7 @@
 #include "asterisk/utils.h"
 #include "asterisk/app.h"
 
-static int base64_encode(struct ast_channel *chan, char *cmd, char *data,
+static int base64_encode(struct ast_channel *chan, const const char *cmd, char *data,
 			 char *buf, size_t len)
 {
 	if (ast_strlen_zero(data)) {
@@ -50,7 +50,7 @@
 	return 0;
 }
 
-static int base64_decode(struct ast_channel *chan, char *cmd, char *data,
+static int base64_decode(struct ast_channel *chan, const const char *cmd, char *data,
 			 char *buf, size_t len)
 {
 	if (ast_strlen_zero(data)) {

Modified: trunk/funcs/func_blacklist.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_blacklist.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_blacklist.c (original)
+++ trunk/funcs/func_blacklist.c Fri Jan  5 18:13:33 2007
@@ -47,7 +47,7 @@
 #include "asterisk/astdb.h"
 #include "asterisk/options.h"
 
-static int blacklist_read(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int blacklist_read(struct ast_channel *chan, const const char *cmd, char *data, char *buf, size_t len)
 {
 	char blacklist[1];
 	int bl = 0;

Modified: trunk/funcs/func_callerid.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_callerid.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_callerid.c (original)
+++ trunk/funcs/func_callerid.c Fri Jan  5 18:13:33 2007
@@ -38,7 +38,7 @@
 #include "asterisk/options.h"
 #include "asterisk/callerid.h"
 
-static int callerid_read(struct ast_channel *chan, char *cmd, char *data,
+static int callerid_read(struct ast_channel *chan, const const char *cmd, char *data,
 			 char *buf, size_t len)
 {
 	char *opt = data;
@@ -96,7 +96,7 @@
 	return 0;
 }
 
-static int callerid_write(struct ast_channel *chan, char *cmd, char *data,
+static int callerid_write(struct ast_channel *chan, const const char *cmd, char *data,
 			  const char *value)
 {
 	if (!value)

Modified: trunk/funcs/func_cdr.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_cdr.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_cdr.c (original)
+++ trunk/funcs/func_cdr.c Fri Jan  5 18:13:33 2007
@@ -52,7 +52,7 @@
 	AST_APP_OPTION('u', OPT_UNPARSED),
 });
 
-static int cdr_read(struct ast_channel *chan, char *cmd, char *parse,
+static int cdr_read(struct ast_channel *chan, const char *cmd, char *parse,
 		    char *buf, size_t len)
 {
 	char *ret;
@@ -85,7 +85,7 @@
 	return 0;
 }
 
-static int cdr_write(struct ast_channel *chan, char *cmd, char *parse,
+static int cdr_write(struct ast_channel *chan, const char *cmd, char *parse,
 		     const char *value)
 {
 	struct ast_flags flags = { 0 };

Modified: trunk/funcs/func_channel.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_channel.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_channel.c (original)
+++ trunk/funcs/func_channel.c Fri Jan  5 18:13:33 2007
@@ -59,7 +59,7 @@
 	"3K1AUDIO", "DIGITAL_W_TONES", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK",
 	"VIDEO", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK", };
 
-static int func_channel_read(struct ast_channel *chan, char *function,
+static int func_channel_read(struct ast_channel *chan, const char *function,
 			     char *data, char *buf, size_t len)
 {
 	int ret = 0;
@@ -100,7 +100,7 @@
 	return ret;
 }
 
-static int func_channel_write(struct ast_channel *chan, char *function,
+static int func_channel_write(struct ast_channel *chan, const char *function,
 			      char *data, const char *value)
 {
 	int ret = 0;

Modified: trunk/funcs/func_curl.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_curl.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_curl.c (original)
+++ trunk/funcs/func_curl.c Fri Jan  5 18:13:33 2007
@@ -131,7 +131,7 @@
 	return 0;
 }
 
-static int acf_curl_exec(struct ast_channel *chan, char *cmd, char *info, char *buf, size_t len)
+static int acf_curl_exec(struct ast_channel *chan, const char *cmd, char *info, char *buf, size_t len)
 {
 	struct ast_module_user *u;
 	struct MemoryStruct chunk = { NULL, 0 };

Modified: trunk/funcs/func_cut.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_cut.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_cut.c (original)
+++ trunk/funcs/func_cut.c Fri Jan  5 18:13:33 2007
@@ -208,7 +208,7 @@
 	return 0;
 }
 
-static int acf_sort_exec(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int acf_sort_exec(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 	struct ast_module_user *u;
 	int ret = -1;
@@ -234,7 +234,7 @@
 	return ret;
 }
 
-static int acf_cut_exec(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int acf_cut_exec(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 	int ret = -1;
 	struct ast_module_user *u;

Modified: trunk/funcs/func_db.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_db.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_db.c (original)
+++ trunk/funcs/func_db.c Fri Jan  5 18:13:33 2007
@@ -44,7 +44,7 @@
 #include "asterisk/app.h"
 #include "asterisk/astdb.h"
 
-static int function_db_read(struct ast_channel *chan, char *cmd,
+static int function_db_read(struct ast_channel *chan, const char *cmd,
 			    char *parse, char *buf, size_t len)
 {
 	AST_DECLARE_APP_ARGS(args,
@@ -76,7 +76,7 @@
 	return 0;
 }
 
-static int function_db_write(struct ast_channel *chan, char *cmd, char *parse,
+static int function_db_write(struct ast_channel *chan, const char *cmd, char *parse,
 			     const char *value)
 {
 	AST_DECLARE_APP_ARGS(args,
@@ -116,7 +116,7 @@
 	.write = function_db_write,
 };
 
-static int function_db_exists(struct ast_channel *chan, char *cmd,
+static int function_db_exists(struct ast_channel *chan, const char *cmd,
 			      char *parse, char *buf, size_t len)
 {
 	AST_DECLARE_APP_ARGS(args,
@@ -160,7 +160,7 @@
 	.read = function_db_exists,
 };
 
-static int function_db_delete(struct ast_channel *chan, char* cmd,
+static int function_db_delete(struct ast_channel *chan, const char *cmd,
 			      char *parse, char *buf, size_t len)
 {
 	AST_DECLARE_APP_ARGS(args,

Modified: trunk/funcs/func_enum.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_enum.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_enum.c (original)
+++ trunk/funcs/func_enum.c Fri Jan  5 18:13:33 2007
@@ -50,7 +50,7 @@
 
  static char *synopsis = "Syntax: ENUMLOOKUP(number[|Method-type[|options[|record#[|zone-suffix]]]])\n";
 
-static int function_enum(struct ast_channel *chan, char *cmd, char *data,
+static int function_enum(struct ast_channel *chan, const char *cmd, char *data,
 			 char *buf, size_t len)
 {
 	AST_DECLARE_APP_ARGS(args,
@@ -132,7 +132,7 @@
 	.read = function_enum,
 };
 
-static int function_txtcidname(struct ast_channel *chan, char *cmd,
+static int function_txtcidname(struct ast_channel *chan, const char *cmd,
 			       char *data, char *buf, size_t len)
 {
 	int res;

Modified: trunk/funcs/func_env.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_env.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_env.c (original)
+++ trunk/funcs/func_env.c Fri Jan  5 18:13:33 2007
@@ -37,7 +37,7 @@
 #include "asterisk/utils.h"
 #include "asterisk/app.h"
 
-static int env_read(struct ast_channel *chan, char *cmd, char *data,
+static int env_read(struct ast_channel *chan, const char *cmd, char *data,
 		    char *buf, size_t len)
 {
 	char *ret = NULL;
@@ -53,7 +53,7 @@
 	return 0;
 }
 
-static int env_write(struct ast_channel *chan, char *cmd, char *data,
+static int env_write(struct ast_channel *chan, const char *cmd, char *data,
 		     const char *value)
 {
 	if (!ast_strlen_zero(data)) {
@@ -67,7 +67,7 @@
 	return 0;
 }
 
-static int stat_read(struct ast_channel *chan, char *cmd, char *data,
+static int stat_read(struct ast_channel *chan, const char *cmd, char *data,
 		     char *buf, size_t len)
 {
 	char *action;

Modified: trunk/funcs/func_global.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_global.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_global.c (original)
+++ trunk/funcs/func_global.c Fri Jan  5 18:13:33 2007
@@ -38,7 +38,7 @@
 #include "asterisk/pbx.h"
 #include "asterisk/utils.h"
 
-static int global_read(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int global_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 	const char *var = pbx_builtin_getvar_helper(NULL, data);
 
@@ -50,7 +50,7 @@
 	return 0;
 }
 
-static int global_write(struct ast_channel *chan, char *cmd, char *data, const char *value)
+static int global_write(struct ast_channel *chan, const char *cmd, char *data, const char *value)
 {
 	pbx_builtin_setvar_helper(NULL, data, value);
 

Modified: trunk/funcs/func_groupcount.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_groupcount.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_groupcount.c (original)
+++ trunk/funcs/func_groupcount.c Fri Jan  5 18:13:33 2007
@@ -36,7 +36,7 @@
 #include "asterisk/utils.h"
 #include "asterisk/app.h"
 
-static int group_count_function_read(struct ast_channel *chan, char *cmd,
+static int group_count_function_read(struct ast_channel *chan, const char *cmd,
 				     char *data, char *buf, size_t len)
 {
 	int count;
@@ -72,7 +72,7 @@
 };
 
 static int group_match_count_function_read(struct ast_channel *chan,
-					   char *cmd, char *data, char *buf,
+					   const char *cmd, char *data, char *buf,
 					   size_t len)
 {
 	int count;
@@ -102,7 +102,7 @@
 	.write = NULL,
 };
 
-static int group_function_read(struct ast_channel *chan, char *cmd,
+static int group_function_read(struct ast_channel *chan, const char *cmd,
 			       char *data, char *buf, size_t len)
 {
 	char varname[256];
@@ -122,7 +122,7 @@
 	return 0;
 }
 
-static int group_function_write(struct ast_channel *chan, char *cmd,
+static int group_function_write(struct ast_channel *chan, const char *cmd,
 				char *data, const char *value)
 {
 	char grpcat[256];
@@ -149,7 +149,7 @@
 	.write = group_function_write,
 };
 
-static int group_list_function_read(struct ast_channel *chan, char *cmd,
+static int group_list_function_read(struct ast_channel *chan, const char *cmd,
 				    char *data, char *buf, size_t len)
 {
 	struct ast_var_t *current;

Modified: trunk/funcs/func_logic.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_logic.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_logic.c (original)
+++ trunk/funcs/func_logic.c Fri Jan  5 18:13:33 2007
@@ -38,7 +38,7 @@
 #include "asterisk/utils.h"
 #include "asterisk/app.h"
 
-static int isnull(struct ast_channel *chan, char *cmd, char *data,
+static int isnull(struct ast_channel *chan, const char *cmd, char *data,
 		  char *buf, size_t len)
 {
 	strcpy(buf, data && *data ? "0" : "1");
@@ -46,7 +46,7 @@
 	return 0;
 }
 
-static int exists(struct ast_channel *chan, char *cmd, char *data, char *buf,
+static int exists(struct ast_channel *chan, const char *cmd, char *data, char *buf,
 		  size_t len)
 {
 	strcpy(buf, data && *data ? "1" : "0");
@@ -54,7 +54,7 @@
 	return 0;
 }
 
-static int iftime(struct ast_channel *chan, char *cmd, char *data, char *buf,
+static int iftime(struct ast_channel *chan, const char *cmd, char *data, char *buf,
 		  size_t len)
 {
 	struct ast_timing timing;
@@ -88,7 +88,7 @@
 	return 0;
 }
 
-static int acf_if(struct ast_channel *chan, char *cmd, char *data, char *buf,
+static int acf_if(struct ast_channel *chan, const char *cmd, char *data, char *buf,
 		  size_t len)
 {
 	char *expr;
@@ -116,7 +116,7 @@
 	return 0;
 }
 
-static int set(struct ast_channel *chan, char *cmd, char *data, char *buf,
+static int set(struct ast_channel *chan, const char *cmd, char *data, char *buf,
 	       size_t len)
 {
 	char *varname;

Modified: trunk/funcs/func_math.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_math.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_math.c (original)
+++ trunk/funcs/func_math.c Fri Jan  5 18:13:33 2007
@@ -65,7 +65,7 @@
 	CHAR_RESULT
 };
 
-static int math(struct ast_channel *chan, char *cmd, char *parse,
+static int math(struct ast_channel *chan, const char *cmd, char *parse,
 		char *buf, size_t len)
 {
 	float fnum1;

Modified: trunk/funcs/func_md5.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_md5.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_md5.c (original)
+++ trunk/funcs/func_md5.c Fri Jan  5 18:13:33 2007
@@ -40,7 +40,7 @@
 #include "asterisk/utils.h"
 #include "asterisk/app.h"
 
-static int md5(struct ast_channel *chan, char *cmd, char *data,
+static int md5(struct ast_channel *chan, const char *cmd, char *data,
 	       char *buf, size_t len)
 {
 	if (ast_strlen_zero(data)) {

Modified: trunk/funcs/func_module.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_module.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_module.c (original)
+++ trunk/funcs/func_module.c Fri Jan  5 18:13:33 2007
@@ -37,7 +37,7 @@
 #include "asterisk/app.h"
 #include "asterisk/module.h"
 
-static int ifmodule_read(struct ast_channel *chan, char *cmd, char *data,
+static int ifmodule_read(struct ast_channel *chan, const char *cmd, char *data,
 		    char *buf, size_t len)
 {
 	char *ret = "0";

Modified: trunk/funcs/func_odbc.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_odbc.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_odbc.c (original)
+++ trunk/funcs/func_odbc.c Fri Jan  5 18:13:33 2007
@@ -93,7 +93,7 @@
 /*
  * Master control routine
  */
-static int acf_odbc_write(struct ast_channel *chan, char *cmd, char *s, const char *value)
+static int acf_odbc_write(struct ast_channel *chan, const char *cmd, char *s, const char *value)
 {
 	struct odbc_obj *obj = NULL;
 	struct acf_odbc_query *query;
@@ -193,7 +193,7 @@
 	return 0;
 }
 
-static int acf_odbc_read(struct ast_channel *chan, char *cmd, char *s, char *buf, size_t len)
+static int acf_odbc_read(struct ast_channel *chan, const char *cmd, char *s, char *buf, size_t len)
 {
 	struct odbc_obj *obj = NULL;
 	struct acf_odbc_query *query;
@@ -352,7 +352,7 @@
 	return 0;
 }
 
-static int acf_escape(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int acf_escape(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 	char *out = buf;
 

Modified: trunk/funcs/func_rand.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_rand.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_rand.c (original)
+++ trunk/funcs/func_rand.c Fri Jan  5 18:13:33 2007
@@ -40,7 +40,7 @@
 #include "asterisk/app.h"
 #include "asterisk/options.h"
 
-static int acf_rand_exec(struct ast_channel *chan, char *cmd,
+static int acf_rand_exec(struct ast_channel *chan, const char *cmd,
 			 char *parse, char *buffer, size_t buflen)
 {
 	struct ast_module_user *u;

Modified: trunk/funcs/func_realtime.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_realtime.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_realtime.c (original)
+++ trunk/funcs/func_realtime.c Fri Jan  5 18:13:33 2007
@@ -45,7 +45,7 @@
 #include "asterisk/utils.h"
 #include "asterisk/app.h"
 
-static int function_realtime_read(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len) 
+static int function_realtime_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) 
 {
 	struct ast_variable *var, *head;
         struct ast_module_user *u;
@@ -98,7 +98,7 @@
 	return 0;
 }
 
-static int function_realtime_write(struct ast_channel *chan, char *cmd, char *data, const char *value)
+static int function_realtime_write(struct ast_channel *chan, const char *cmd, char *data, const char *value)
 {
         struct ast_module_user *u;
 	int res = 0;

Modified: trunk/funcs/func_sha1.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_sha1.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_sha1.c (original)
+++ trunk/funcs/func_sha1.c Fri Jan  5 18:13:33 2007
@@ -38,7 +38,7 @@
 #include "asterisk/utils.h"
 #include "asterisk/app.h"
 
-static int sha1(struct ast_channel *chan, char *cmd, char *data,
+static int sha1(struct ast_channel *chan, const char *cmd, char *data,
 		char *buf, size_t len)
 {
 	*buf = '\0';

Modified: trunk/funcs/func_strings.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_strings.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_strings.c (original)
+++ trunk/funcs/func_strings.c Fri Jan  5 18:13:33 2007
@@ -43,7 +43,7 @@
 #include "asterisk/localtime.h"
 #include "asterisk/options.h"
 
-static int function_fieldqty(struct ast_channel *chan, char *cmd,
+static int function_fieldqty(struct ast_channel *chan, const char *cmd,
 			     char *parse, char *buf, size_t len)
 {
 	char *varval;
@@ -73,7 +73,7 @@
 	.read = function_fieldqty,
 };
 
-static int filter(struct ast_channel *chan, char *cmd, char *parse, char *buf,
+static int filter(struct ast_channel *chan, const char *cmd, char *parse, char *buf,
 		  size_t len)
 {
 	AST_DECLARE_APP_ARGS(args,
@@ -105,7 +105,7 @@
 	.read = filter,
 };
 
-static int regex(struct ast_channel *chan, char *cmd, char *parse, char *buf,
+static int regex(struct ast_channel *chan, const char *cmd, char *parse, char *buf,
 		 size_t len)
 {
 	AST_DECLARE_APP_ARGS(args,
@@ -186,7 +186,7 @@
 	return 0;
 }
 
-static int array(struct ast_channel *chan, char *cmd, char *var,
+static int array(struct ast_channel *chan, const char *cmd, char *var,
 		 const char *value)
 {
 	AST_DECLARE_APP_ARGS(arg1,
@@ -256,7 +256,7 @@
 	return 0;
 }
 
-static int hashkeys_read(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int hashkeys_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 	struct ast_var_t *newvar;
 	int plen;
@@ -278,7 +278,7 @@
 	return 0;
 }
 
-static int hash_write(struct ast_channel *chan, char *cmd, char *var, const char *value)
+static int hash_write(struct ast_channel *chan, const char *cmd, char *var, const char *value)
 {
 	char varname[256];
 	AST_DECLARE_APP_ARGS(arg,
@@ -298,7 +298,7 @@
 	return 0;
 }
 
-static int hash_read(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int hash_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 	char varname[256];
 	const char *varvalue;
@@ -382,7 +382,7 @@
 		"entire argument, since Set can take multiple arguments itself.\n",
 };
 
-static int acf_sprintf(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int acf_sprintf(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 #define SPRINTF_FLAG	0
 #define SPRINTF_WIDTH	1
@@ -525,7 +525,7 @@
 "a format specifier is not recognized.\n",
 };
 
-static int quote(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int quote(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 	char *bufptr = buf, *dataptr = data;
 	*bufptr++ = '"';
@@ -555,7 +555,7 @@
 };
 
 
-static int len(struct ast_channel *chan, char *cmd, char *data, char *buf,
+static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf,
 	       size_t len)
 {
 	int length = 0;
@@ -575,7 +575,7 @@
 	.read = len,
 };
 
-static int acf_strftime(struct ast_channel *chan, char *cmd, char *parse,
+static int acf_strftime(struct ast_channel *chan, const char *cmd, char *parse,
 			char *buf, size_t len)
 {
 	AST_DECLARE_APP_ARGS(args,
@@ -611,7 +611,7 @@
 	.read = acf_strftime,
 };
 
-static int acf_strptime(struct ast_channel *chan, char *cmd, char *data,
+static int acf_strptime(struct ast_channel *chan, const char *cmd, char *data,
 			char *buf, size_t len)
 {
 	AST_DECLARE_APP_ARGS(args,
@@ -663,7 +663,7 @@
 	.read = acf_strptime,
 };
 
-static int function_eval(struct ast_channel *chan, char *cmd, char *data,
+static int function_eval(struct ast_channel *chan, const char *cmd, char *data,
 			 char *buf, size_t len)
 {
 	buf[0] = '\0';
@@ -694,7 +694,7 @@
 	.read = function_eval,
 };
 
-static int keypadhash(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int keypadhash(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 	char *bufptr, *dataptr;
 

Modified: trunk/funcs/func_timeout.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_timeout.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_timeout.c (original)
+++ trunk/funcs/func_timeout.c Fri Jan  5 18:13:33 2007
@@ -40,7 +40,7 @@
 #include "asterisk/app.h"
 #include "asterisk/options.h"
 
-static int timeout_read(struct ast_channel *chan, char *cmd, char *data,
+static int timeout_read(struct ast_channel *chan, const char *cmd, char *data,
 			char *buf, size_t len)
 {
 	time_t myt;
@@ -83,7 +83,7 @@
 	return 0;
 }
 
-static int timeout_write(struct ast_channel *chan, char *cmd, char *data,
+static int timeout_write(struct ast_channel *chan, const char *cmd, char *data,
 			 const char *value)
 {
 	int x;

Modified: trunk/funcs/func_uri.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_uri.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_uri.c (original)
+++ trunk/funcs/func_uri.c Fri Jan  5 18:13:33 2007
@@ -44,7 +44,7 @@
 #include "asterisk/app.h"
 
 /*! \brief uriencode: Encode URL according to RFC 2396 */
-static int uriencode(struct ast_channel *chan, char *cmd, char *data,
+static int uriencode(struct ast_channel *chan, const char *cmd, char *data,
 		     char *buf, size_t len)
 {
 	if (ast_strlen_zero(data)) {
@@ -58,7 +58,7 @@
 }
 
 /*!\brief uridecode: Decode URI according to RFC 2396 */
-static int uridecode(struct ast_channel *chan, char *cmd, char *data,
+static int uridecode(struct ast_channel *chan, const char *cmd, char *data,
 		     char *buf, size_t len)
 {
 	if (ast_strlen_zero(data)) {

Modified: trunk/funcs/func_version.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_version.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_version.c (original)
+++ trunk/funcs/func_version.c Fri Jan  5 18:13:33 2007
@@ -43,7 +43,7 @@
 #define STRING_IT(vernum) STRING_IT2(vernum)
 #define STRING_IT2(vernum) #vernum
 
-static int acf_version_exec(struct ast_channel *chan, char *cmd,
+static int acf_version_exec(struct ast_channel *chan, const char *cmd,
 			 char *parse, char *buffer, size_t buflen)
 {
 	struct ast_module_user *u;

Modified: trunk/funcs/func_vmcount.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_vmcount.c?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/funcs/func_vmcount.c (original)
+++ trunk/funcs/func_vmcount.c Fri Jan  5 18:13:33 2007
@@ -45,7 +45,7 @@
 #include "asterisk/app.h"
 #include "asterisk/options.h"
 
-static int acf_vmcount_exec(struct ast_channel *chan, char *cmd, char *argsstr, char *buf, size_t len)
+static int acf_vmcount_exec(struct ast_channel *chan, const char *cmd, char *argsstr, char *buf, size_t len)
 {
 	struct ast_module_user *u;
 	char *context;

Modified: trunk/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/channel.h?view=diff&rev=49741&r1=49740&r2=49741
==============================================================================
--- trunk/include/asterisk/channel.h (original)
+++ trunk/include/asterisk/channel.h Fri Jan  5 18:13:33 2007
@@ -301,10 +301,10 @@
 	struct ast_channel *(* const bridged_channel)(struct ast_channel *chan, struct ast_channel *bridge);
 
 	/*! \brief Provide additional read items for CHANNEL() dialplan function */
-	int (* func_channel_read)(struct ast_channel *chan, char *function, char *data, char *buf, size_t len);
+	int (* func_channel_read)(struct ast_channel *chan, const char *function, char *data, char *buf, size_t len);
 
 	/*! \brief Provide additional write items for CHANNEL() dialplan function */
-	int (* func_channel_write)(struct ast_channel *chan, char *function, char *data, const char *value);
+	int (* func_channel_write)(struct ast_channel *chan, const char *function, char *data, const char *value);
 };
 
 struct ast_channel_spy_list;	/*!< \todo Add explanation here */



More information about the asterisk-commits mailing list