diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-26 18:39:06 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-26 18:39:06 +0000 |
commit | f0d1cef621b6279261a351a1c06caccd6fe9e85a (patch) | |
tree | e3b98ea87c1f245716b009b4b7173c660297f04e /main/manager.c | |
parent | 48c13bd6a34d681877f05c8bb7ed1ec47360f56e (diff) |
Add the "config reload <conffile>" command, which allows you to tell Asterisk
to reload any file that references a given configuration file.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@111012 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/manager.c')
-rw-r--r-- | main/manager.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/main/manager.c b/main/manager.c index e54238c23..e8eebf9b8 100644 --- a/main/manager.c +++ b/main/manager.c @@ -1089,7 +1089,7 @@ static int action_getconfig(struct mansession *s, const struct message *m) astman_send_error(s, m, "Filename not specified"); return 0; } - if (!(cfg = ast_config_load(fn, config_flags))) { + if (!(cfg = ast_config_load2(fn, "manager", config_flags))) { astman_send_error(s, m, "Config file not found"); return 0; } @@ -1130,7 +1130,7 @@ static int action_listcategories(struct mansession *s, const struct message *m) astman_send_error(s, m, "Filename not specified"); return 0; } - if (!(cfg = ast_config_load(fn, config_flags))) { + if (!(cfg = ast_config_load2(fn, "manager", config_flags))) { astman_send_error(s, m, "Config file not found or file has invalid syntax"); return 0; } @@ -1184,7 +1184,7 @@ static int action_getconfigjson(struct mansession *s, const struct message *m) return 0; } - if (!(cfg = ast_config_load(fn, config_flags))) { + if (!(cfg = ast_config_load2(fn, "manager", config_flags))) { astman_send_error(s, m, "Config file not found"); return 0; } @@ -1355,7 +1355,7 @@ static int action_updateconfig(struct mansession *s, const struct message *m) astman_send_error(s, m, "Filename not specified"); return 0; } - if (!(cfg = ast_config_load(sfn, config_flags))) { + if (!(cfg = ast_config_load2(sfn, "manager", config_flags))) { astman_send_error(s, m, "Config file not found"); return 0; } @@ -3757,7 +3757,7 @@ static int __init_manager(int reload) /* Append placeholder event so master_eventq never runs dry */ append_event("Event: Placeholder\r\n\r\n", 0); } - if ((cfg = ast_config_load("manager.conf", config_flags)) == CONFIG_STATUS_FILEUNCHANGED) + if ((cfg = ast_config_load2("manager.conf", "manager", config_flags)) == CONFIG_STATUS_FILEUNCHANGED) return 0; displayconnects = 1; @@ -3839,7 +3839,7 @@ static int __init_manager(int reload) AST_RWLIST_WRLOCK(&users); /* First, get users from users.conf */ - ucfg = ast_config_load("users.conf", config_flags); + ucfg = ast_config_load2("users.conf", "manager", config_flags); if (ucfg && (ucfg != CONFIG_STATUS_FILEUNCHANGED)) { const char *hasmanager; int genhasmanager = ast_true(ast_variable_retrieve(ucfg, "general", "hasmanager")); |