summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2007-01-05 23:58:53 +0000
committerKevin P. Fleming <kpfleming@digium.com>2007-01-05 23:58:53 +0000
commitd0f3b18d1610c0b6d7dbb63aaf4b44407e622906 (patch)
treea338d2e4eefd3e9c8bf6100cdd9924bda5d1c408
parent130eb5602f8e4b9d5ecf91091607ca47f2a4eea6 (diff)
a little more const-ification
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--include/asterisk/config.h6
-rw-r--r--main/config.c6
-rw-r--r--main/manager.c6
3 files changed, 9 insertions, 9 deletions
diff --git a/include/asterisk/config.h b/include/asterisk/config.h
index a16de0b53..ac752ca99 100644
--- a/include/asterisk/config.h
+++ b/include/asterisk/config.h
@@ -176,15 +176,15 @@ const char *ast_config_option(struct ast_config *cfg, const char *cat, const cha
struct ast_category *ast_category_new(const char *name);
void ast_category_append(struct ast_config *config, struct ast_category *cat);
-int ast_category_delete(struct ast_config *cfg, char *category);
+int ast_category_delete(struct ast_config *cfg, const char *category);
void ast_category_destroy(struct ast_category *cat);
struct ast_variable *ast_category_detach_variables(struct ast_category *cat);
void ast_category_rename(struct ast_category *cat, const char *name);
struct ast_variable *ast_variable_new(const char *name, const char *value);
void ast_variable_append(struct ast_category *category, struct ast_variable *variable);
-int ast_variable_delete(struct ast_category *category, char *variable, char *match);
-int ast_variable_update(struct ast_category *category, char *variable, char *value, char *match);
+int ast_variable_delete(struct ast_category *category, const char *variable, const char *match);
+int ast_variable_update(struct ast_category *category, const char *variable, const char *value, const char *match);
int config_text_file_save(const char *filename, const struct ast_config *cfg, const char *generator);
diff --git a/main/config.c b/main/config.c
index 15f5064de..4a14d21b5 100644
--- a/main/config.c
+++ b/main/config.c
@@ -425,7 +425,7 @@ struct ast_config *ast_config_new(void)
return config;
}
-int ast_variable_delete(struct ast_category *category, char *variable, char *match)
+int ast_variable_delete(struct ast_category *category, const char *variable, const char *match)
{
struct ast_variable *cur, *prev=NULL, *curn;
int res = -1;
@@ -474,7 +474,7 @@ int ast_variable_delete(struct ast_category *category, char *variable, char *mat
return res;
}
-int ast_variable_update(struct ast_category *category, char *variable, char *value, char *match)
+int ast_variable_update(struct ast_category *category, const char *variable, const char *value, const char *match)
{
struct ast_variable *cur, *prev=NULL, *newer;
newer = ast_variable_new(variable, value);
@@ -525,7 +525,7 @@ int ast_variable_update(struct ast_category *category, char *variable, char *val
return 0;
}
-int ast_category_delete(struct ast_config *cfg, char *category)
+int ast_category_delete(struct ast_config *cfg, const char *category)
{
struct ast_category *prev=NULL, *cat;
cat = cfg->root;
diff --git a/main/manager.c b/main/manager.c
index c1f72ca45..dead94fa2 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -1047,13 +1047,13 @@ static void handle_updates(struct mansession *s, const struct message *m, struct
}
} else if (!strcasecmp(action, "delcat")) {
if (!ast_strlen_zero(cat))
- ast_category_delete(cfg, (char *) cat);
+ ast_category_delete(cfg, cat);
} else if (!strcasecmp(action, "update")) {
if (!ast_strlen_zero(cat) && !ast_strlen_zero(var) && (category = ast_category_get(cfg, cat)))
- ast_variable_update(category, (char *) var, (char *) value, (char *) match);
+ ast_variable_update(category, var, value, match);
} else if (!strcasecmp(action, "delete")) {
if (!ast_strlen_zero(cat) && !ast_strlen_zero(var) && (category = ast_category_get(cfg, cat)))
- ast_variable_delete(category, (char *) var, (char *) match);
+ ast_variable_delete(category, var, match);
} else if (!strcasecmp(action, "append")) {
if (!ast_strlen_zero(cat) && !ast_strlen_zero(var) &&
(category = ast_category_get(cfg, cat)) &&