[asterisk-commits] tilghman: trunk r89270 - in /trunk: channels/ main/ res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Nov 14 09:13:23 CST 2007
Author: tilghman
Date: Wed Nov 14 09:13:22 2007
New Revision: 89270
URL: http://svn.digium.com/view/asterisk?view=rev&rev=89270
Log:
One more typo in config.c; and missed conversions due to the constifying of ast_variable_new parameters
Modified:
trunk/channels/chan_phone.c
trunk/channels/chan_zap.c
trunk/main/config.c
trunk/res/res_config_sqlite.c
trunk/res/res_jabber.c
trunk/res/res_odbc.c
Modified: trunk/channels/chan_phone.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_phone.c?view=diff&rev=89270&r1=89269&r2=89270
==============================================================================
--- trunk/channels/chan_phone.c (original)
+++ trunk/channels/chan_phone.c Wed Nov 14 09:13:22 2007
@@ -1155,7 +1155,7 @@
return 0;
}
-static struct phone_pvt *mkif(char *iface, int mode, int txgain, int rxgain)
+static struct phone_pvt *mkif(const char *iface, int mode, int txgain, int rxgain)
{
/* Make a phone_pvt structure for this interface */
struct phone_pvt *tmp;
@@ -1258,7 +1258,7 @@
}
/* parse gain value from config file */
-static int parse_gain_value(char *gain_type, char *value)
+static int parse_gain_value(const char *gain_type, const char *value)
{
float gain;
Modified: trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_zap.c?view=diff&rev=89270&r1=89269&r2=89270
==============================================================================
--- trunk/channels/chan_zap.c (original)
+++ trunk/channels/chan_zap.c Wed Nov 14 09:13:22 2007
@@ -12246,7 +12246,7 @@
static int process_zap(struct zt_chan_conf *confp, struct ast_variable *v, int reload, int skipchannels)
{
struct zt_pvt *tmp;
- char *ringc; /* temporary string for parsing the dring number. */
+ const char *ringc; /* temporary string for parsing the dring number. */
int y;
int found_pseudo = 0;
char zapchan[MAX_CHANLIST_LEN] = {};
@@ -12785,9 +12785,9 @@
}
} else if (!strcasecmp(v->name, "pritimer")) {
#ifdef PRI_GETSET_TIMERS
- char *timerc, *c;
+ char tmp[20], *timerc, *c = tmp;
int timer, timeridx;
- c = v->value;
+ ast_copy_string(tmp, v->value, sizeof(tmp));
timerc = strsep(&c, ",");
if (timerc) {
timer = atoi(c);
Modified: trunk/main/config.c
URL: http://svn.digium.com/view/asterisk/trunk/main/config.c?view=diff&rev=89270&r1=89269&r2=89270
==============================================================================
--- trunk/main/config.c (original)
+++ trunk/main/config.c Wed Nov 14 09:13:22 2007
@@ -267,7 +267,7 @@
variable->name = strcpy(dst, name);
dst += name_len;
variable->value = strcpy(dst, value);
- dst += fn_len;
+ dst += val_len;
variable->file = strcpy(dst, filename);
}
return variable;
Modified: trunk/res/res_config_sqlite.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_config_sqlite.c?view=diff&rev=89270&r1=89269&r2=89270
==============================================================================
--- trunk/res/res_config_sqlite.c (original)
+++ trunk/res/res_config_sqlite.c Wed Nov 14 09:13:22 2007
@@ -215,7 +215,7 @@
* \retval 0 on success
* \retval 1 if an allocation error occurred
*/
-static int set_var(char **var, char *name, char *value);
+static int set_var(char **var, const char *name, const char *value);
/*!
* \brief Load the configuration file.
@@ -587,7 +587,7 @@
" WHERE filename = '%q' AND commented = 0"
" ORDER BY cat_metric ASC, var_metric ASC;";
-static int set_var(char **var, char *name, char *value)
+static int set_var(char **var, const char *name, const char *value)
{
if (*var)
ast_free(*var);
Modified: trunk/res/res_jabber.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_jabber.c?view=diff&rev=89270&r1=89269&r2=89270
==============================================================================
--- trunk/res/res_jabber.c (original)
+++ trunk/res/res_jabber.c Wed Nov 14 09:13:22 2007
@@ -2650,7 +2650,7 @@
else if (!strcasecmp(var->name, "autoregister"))
ast_set2_flag(client, ast_true(var->value), AJI_AUTOREGISTER);
else if (!strcasecmp(var->name, "buddy"))
- aji_create_buddy(var->value, client);
+ aji_create_buddy((char *)var->value, client);
else if (!strcasecmp(var->name, "priority"))
client->priority = atoi(var->value);
else if (!strcasecmp(var->name, "status")) {
Modified: trunk/res/res_odbc.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_odbc.c?view=diff&rev=89270&r1=89269&r2=89270
==============================================================================
--- trunk/res/res_odbc.c (original)
+++ trunk/res/res_odbc.c Wed Nov 14 09:13:22 2007
@@ -232,7 +232,8 @@
static char *cfg = "res_odbc.conf";
struct ast_config *config;
struct ast_variable *v;
- char *cat, *dsn, *username, *password, *sanitysql;
+ char *cat;
+ const char *dsn, *username, *password, *sanitysql;
int enabled, pooling, limit;
int connect = 0, res = 0;
struct ast_flags config_flags = { 0 };
@@ -581,7 +582,8 @@
static char *cfg = "res_odbc.conf";
struct ast_config *config;
struct ast_variable *v;
- char *cat, *dsn, *username, *password, *sanitysql;
+ char *cat;
+ const char *dsn, *username, *password, *sanitysql;
int enabled, pooling, limit;
int connect = 0, res = 0;
struct ast_flags config_flags = { CONFIG_FLAG_FILEUNCHANGED };
More information about the asterisk-commits
mailing list