mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
One more typo in config.c; and missed conversions due to the constifying of ast_variable_new parameters
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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;
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
@@ -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")) {
|
||||
|
@@ -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 };
|
||||
|
Reference in New Issue
Block a user