[asterisk-commits] kpfleming: trunk r49711 - in /trunk: ./ apps/ channels/ include/asterisk/ mai...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Jan 5 16:32:43 MST 2007


Author: kpfleming
Date: Fri Jan  5 17:32:42 2007
New Revision: 49711

URL: http://svn.digium.com/view/asterisk?view=rev&rev=49711
Log:
block this rev from being merged, the problem will be fixed differently here

Modified:
    trunk/   (props changed)
    trunk/apps/app_queue.c
    trunk/apps/app_speech_utils.c
    trunk/apps/app_voicemail.c
    trunk/channels/chan_agent.c
    trunk/channels/chan_iax2.c
    trunk/channels/chan_sip.c
    trunk/include/asterisk/astdb.h
    trunk/include/asterisk/pbx.h
    trunk/main/db.c
    trunk/main/pbx.c
    trunk/pbx/pbx_dundi.c

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

Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?view=diff&rev=49711&r1=49710&r2=49711
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Fri Jan  5 17:32:42 2007
@@ -3637,7 +3637,7 @@
 	return res;
 }
 
-static int queue_function_var(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int queue_function_var(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 	int res = -1;
 	struct call_queue *q;
@@ -3689,7 +3689,7 @@
 	return 0;
 }
 
-static int queue_function_qac(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int queue_function_qac(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 	int count = 0;
 	struct call_queue *q;
@@ -3731,7 +3731,7 @@
 	return 0;
 }
 
-static int queue_function_queuewaitingcount(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int queue_function_queuewaitingcount(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 	int count = 0;
 	struct call_queue *q;
@@ -3766,7 +3766,7 @@
 	return 0;
 }
 
-static int queue_function_queuememberlist(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int queue_function_queuememberlist(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 	struct ast_module_user *u;
 	struct call_queue *q;

Modified: trunk/apps/app_speech_utils.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_speech_utils.c?view=diff&rev=49711&r1=49710&r2=49711
==============================================================================
--- trunk/apps/app_speech_utils.c (original)
+++ trunk/apps/app_speech_utils.c Fri Jan  5 17:32:42 2007
@@ -144,7 +144,7 @@
 }
 
 /*! \brief SPEECH_SCORE() Dialplan Function */
-static int speech_score(struct ast_channel *chan, char *cmd, char *data,
+static int speech_score(struct ast_channel *chan, const char *cmd, char *data,
 		       char *buf, size_t len)
 {
 	struct ast_speech_result *result = NULL;
@@ -172,7 +172,7 @@
 };
 
 /*! \brief SPEECH_TEXT() Dialplan Function */
-static int speech_text(struct ast_channel *chan, char *cmd, char *data,
+static int speech_text(struct ast_channel *chan, const char *cmd, char *data,
 			char *buf, size_t len)
 {
         struct ast_speech_result *result = NULL;
@@ -198,7 +198,7 @@
 };
 
 /*! \brief SPEECH_GRAMMAR() Dialplan Function */
-static int speech_grammar(struct ast_channel *chan, char *cmd, char *data,
+static int speech_grammar(struct ast_channel *chan, const char *cmd, char *data,
 			char *buf, size_t len)
 {
         struct ast_speech_result *result = NULL;
@@ -224,7 +224,7 @@
 };
 
 /*! \brief SPEECH_ENGINE() Dialplan Function */
-static int speech_engine_write(struct ast_channel *chan, char *cmd, char *data, const char *value)
+static int speech_engine_write(struct ast_channel *chan, const char *cmd, char *data, const char *value)
 {
 	struct ast_speech *speech = find_speech(chan);
 
@@ -247,7 +247,7 @@
 };
 
 /*! \brief SPEECH() Dialplan Function */
-static int speech_read(struct ast_channel *chan, char *cmd, char *data,
+static int speech_read(struct ast_channel *chan, const char *cmd, char *data,
 			char *buf, size_t len)
 {
 	int results = 0;

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=49711&r1=49710&r2=49711
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Fri Jan  5 17:32:42 2007
@@ -6914,7 +6914,7 @@
 	return 0;
 }
 
-static int acf_mailbox_exists(struct ast_channel *chan, char *cmd, char *args, char *buf, size_t len)
+static int acf_mailbox_exists(struct ast_channel *chan, const char *cmd, char *args, char *buf, size_t len)
 {
 	struct ast_vm_user svm;
 	AST_DECLARE_APP_ARGS(arg,

Modified: trunk/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_agent.c?view=diff&rev=49711&r1=49710&r2=49711
==============================================================================
--- trunk/channels/chan_agent.c (original)
+++ trunk/channels/chan_agent.c Fri Jan  5 17:32:42 2007
@@ -2384,7 +2384,7 @@
 	return cur;	
 }
 
-static int function_agent(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int function_agent(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 	char *parse;    
 	AST_DECLARE_APP_ARGS(args,

Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=49711&r1=49710&r2=49711
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Fri Jan  5 17:32:42 2007
@@ -9589,7 +9589,7 @@
 	return -1;
 }
 
-static int function_iaxpeer(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int function_iaxpeer(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 	struct iax2_peer *peer;
 	char *peername, *colname;

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=49711&r1=49710&r2=49711
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Jan  5 17:32:42 2007
@@ -1395,10 +1395,6 @@
 static int sip_notify(int fd, int argc, char *argv[]);
 static int sip_do_history(int fd, int argc, char *argv[]);
 static int sip_no_history(int fd, int argc, char *argv[]);
-static int func_header_read(struct ast_channel *chan, char *function, char *data, char *buf, size_t len);
-static int func_check_sipdomain(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len);
-static int function_sippeer(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len);
-static int function_sipchaninfo_read(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len);
 static int sip_dtmfmode(struct ast_channel *chan, void *data);
 static int sip_addheader(struct ast_channel *chan, void *data);
 static int sip_do_reload(enum channelreloadreason reason);
@@ -11403,7 +11399,7 @@
 "       Provides detailed list of the configuration of the SIP channel.\n";
 
 /*! \brief Read SIP header (dialplan function) */
-static int func_header_read(struct ast_channel *chan, char *function, char *data, char *buf, size_t len) 
+static int func_header_read(struct ast_channel *chan, const char *function, char *data, char *buf, size_t len) 
 {
 	struct sip_pvt *p;
 	const char *content = NULL;
@@ -11467,7 +11463,7 @@
 };
 
 /*! \brief  Dial plan function to check if domain is local */
-static int func_check_sipdomain(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int func_check_sipdomain(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "CHECKSIPDOMAIN requires an argument - A domain name\n");
@@ -11492,7 +11488,7 @@
 };
 
 /*! \brief  ${SIPPEER()} Dialplan function - reads peer data */
-static int function_sippeer(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int function_sippeer(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 	struct sip_peer *peer;
 	char *colname;
@@ -11582,7 +11578,7 @@
 };
 
 /*! \brief ${SIPCHANINFO()} Dialplan function - reads sip channel data */
-static int function_sipchaninfo_read(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int function_sipchaninfo_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 	struct sip_pvt *p;
 

Modified: trunk/include/asterisk/astdb.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/astdb.h?view=diff&rev=49711&r1=49710&r2=49711
==============================================================================
--- trunk/include/asterisk/astdb.h (original)
+++ trunk/include/asterisk/astdb.h Fri Jan  5 17:32:42 2007
@@ -35,7 +35,7 @@
 
 int ast_db_get(const char *family, const char *key, char *out, int outlen);
 
-int ast_db_put(const char *family, const char *key, char *value);
+int ast_db_put(const char *family, const char *key, const char *value);
 
 int ast_db_del(const char *family, const char *key);
 

Modified: trunk/include/asterisk/pbx.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/pbx.h?view=diff&rev=49711&r1=49710&r2=49711
==============================================================================
--- trunk/include/asterisk/pbx.h (original)
+++ trunk/include/asterisk/pbx.h Fri Jan  5 17:32:42 2007
@@ -74,8 +74,8 @@
 	const char *synopsis;		/*!< Short description for "show functions" */
 	const char *desc;		/*!< Help text that explains it all */
 	const char *syntax;		/*!< Syntax description */
-	int (*read)(struct ast_channel *, char *, char *, char *, size_t);	/*!< Read function, if read is supported */
-	int (*write)(struct ast_channel *, char *, char *, const char *);	/*!< Write function, if write is supported */
+	int (*read)(struct ast_channel *, const char *, char *, char *, size_t);	/*!< Read function, if read is supported */
+	int (*write)(struct ast_channel *, const char *, char *, const char *);		/*!< Write function, if write is supported */
 	AST_RWLIST_ENTRY(ast_custom_function) acflist;
 };
 
@@ -844,7 +844,7 @@
  *
  * \return zero on success, non-zero on failure
  */
-int ast_func_read(struct ast_channel *chan, char *function, char *workspace, size_t len);
+int ast_func_read(struct ast_channel *chan, const char *function, char *workspace, size_t len);
 
 /*!
  * \brief executes a write operation on a function
@@ -857,7 +857,7 @@
  *
  * \return zero on success, non-zero on failure
  */
-int ast_func_write(struct ast_channel *chan, char *function, const char *value);
+int ast_func_write(struct ast_channel *chan, const char *function, const char *value);
 
 void ast_hint_state_changed(const char *device);
 

Modified: trunk/main/db.c
URL: http://svn.digium.com/view/asterisk/trunk/main/db.c?view=diff&rev=49711&r1=49710&r2=49711
==============================================================================
--- trunk/main/db.c (original)
+++ trunk/main/db.c Fri Jan  5 17:32:42 2007
@@ -142,7 +142,7 @@
 	return 0;
 }
 
-int ast_db_put(const char *family, const char *keys, char *value)
+int ast_db_put(const char *family, const char *keys, const char *value)
 {
 	char fullkey[256];
 	DBT key, data;
@@ -159,7 +159,7 @@
 	memset(&data, 0, sizeof(data));
 	key.data = fullkey;
 	key.size = fullkeylen + 1;
-	data.data = value;
+	data.data = (char *) value;
 	data.size = strlen(value) + 1;
 	res = astdb->put(astdb, &key, &data, 0);
 	astdb->sync(astdb, 0);
@@ -542,7 +542,7 @@
 		return 0;
 	}
 
-	res = ast_db_put(family, key, (char *) val);
+	res = ast_db_put(family, key, val);
 	if (res) {
 		astman_send_error(s, m, "Failed to update entry");
 	} else {

Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?view=diff&rev=49711&r1=49710&r2=49711
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Fri Jan  5 17:32:42 2007
@@ -1407,10 +1407,11 @@
 	return args;
 }
 
-int ast_func_read(struct ast_channel *chan, char *function, char *workspace, size_t len)
-{
-	char *args = func_args(function);
-	struct ast_custom_function *acfptr = ast_custom_function_find(function);
+int ast_func_read(struct ast_channel *chan, const char *function, char *workspace, size_t len)
+{
+	char *copy = ast_strdupa(function);
+	char *args = func_args(copy);
+	struct ast_custom_function *acfptr = ast_custom_function_find(copy);
 
 	if (acfptr == NULL)
 		ast_log(LOG_ERROR, "Function %s not registered\n", function);
@@ -1421,10 +1422,11 @@
 	return -1;
 }
 
-int ast_func_write(struct ast_channel *chan, char *function, const char *value)
-{
-	char *args = func_args(function);
-	struct ast_custom_function *acfptr = ast_custom_function_find(function);
+int ast_func_write(struct ast_channel *chan, const char *function, const char *value)
+{
+	char *copy = ast_strdupa(function);
+	char *args = func_args(copy);
+	struct ast_custom_function *acfptr = ast_custom_function_find(copy);
 
 	if (acfptr == NULL)
 		ast_log(LOG_ERROR, "Function %s not registered\n", function);

Modified: trunk/pbx/pbx_dundi.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_dundi.c?view=diff&rev=49711&r1=49710&r2=49711
==============================================================================
--- trunk/pbx/pbx_dundi.c (original)
+++ trunk/pbx/pbx_dundi.c Fri Jan  5 17:32:42 2007
@@ -3755,7 +3755,7 @@
 	return dundi_query_eid_internal(dei, dcontext, &eid, &hmd, dundi_ttl, 0, avoid);
 }
 
-static int dundifunc_read(struct ast_channel *chan, char *cmd, char *num, char *buf, size_t len)
+static int dundifunc_read(struct ast_channel *chan, const char *cmd, char *num, char *buf, size_t len)
 {
 	char *context;
 	char *opts;



More information about the asterisk-commits mailing list