aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-14 15:13:22 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-14 15:13:22 +0000
commit22206839a45a4e38c78c92a9e5cba4ae00d8dd0f (patch)
tree4d13b85101ee91390cedfbdfd9efba5a436b7aea
parent4373e923a8f07011650708d9a2fee841a3825577 (diff)
One more typo in config.c; and missed conversions due to the constifying of ast_variable_new parameters
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89270 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_phone.c4
-rw-r--r--channels/chan_zap.c6
-rw-r--r--main/config.c2
-rw-r--r--res/res_config_sqlite.c4
-rw-r--r--res/res_jabber.c2
-rw-r--r--res/res_odbc.c6
6 files changed, 13 insertions, 11 deletions
diff --git a/channels/chan_phone.c b/channels/chan_phone.c
index 17204fda5..d657920c3 100644
--- a/channels/chan_phone.c
+++ b/channels/chan_phone.c
@@ -1155,7 +1155,7 @@ static int restart_monitor()
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 @@ static struct ast_channel *phone_request(const char *type, int format, void *dat
}
/* 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;
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 6c9723e65..2ea37472c 100644
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -12246,7 +12246,7 @@ static int build_channels(struct zt_chan_conf conf, int iscrv, const char *value
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 @@ static int process_zap(struct zt_chan_conf *confp, struct ast_variable *v, int r
}
} 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);
diff --git a/main/config.c b/main/config.c
index f02f3014b..134add80a 100644
--- a/main/config.c
+++ b/main/config.c
@@ -267,7 +267,7 @@ struct ast_variable *ast_variable_new(const char *name, const char *value, const
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;
diff --git a/res/res_config_sqlite.c b/res/res_config_sqlite.c
index d05a38237..53987cc9a 100644
--- a/res/res_config_sqlite.c
+++ b/res/res_config_sqlite.c
@@ -215,7 +215,7 @@ struct rt_multi_cfg_entry_args {
* \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 @@ static char *sql_get_config_table =
" 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);
diff --git a/res/res_jabber.c b/res/res_jabber.c
index 464f6a22c..6dfcb9a25 100644
--- a/res/res_jabber.c
+++ b/res/res_jabber.c
@@ -2650,7 +2650,7 @@ static int aji_create_client(char *label, struct ast_variable *var, int debug)
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")) {
diff --git a/res/res_odbc.c b/res/res_odbc.c
index 0b3887232..8d3a4da0b 100644
--- a/res/res_odbc.c
+++ b/res/res_odbc.c
@@ -232,7 +232,8 @@ static int load_odbc_config(void)
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 int reload(void)
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 };