After some discussions, we decided that the return values here were a bit messy.

This also fixes a bug on reload, where peers may not have reregistered properly.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jason Parker 2007-09-12 21:55:32 +00:00
parent 22436131f7
commit 6a90ea5cf4
1 changed files with 3 additions and 3 deletions

View File

@ -10007,7 +10007,7 @@ static int set_config(char *config_file, int reload)
} else if (cfg == CONFIG_STATUS_FILEUNCHANGED) {
ucfg = ast_config_load("users.conf", config_flags);
if (ucfg == CONFIG_STATUS_FILEUNCHANGED)
return 1;
return 0;
/* Otherwise we need to reread both files */
ast_clear_flag(&config_flags, CONFIG_FLAG_FILEUNCHANGED);
cfg = ast_config_load(config_file, config_flags);
@ -10365,7 +10365,7 @@ static int set_config(char *config_file, int reload)
}
ast_config_destroy(cfg);
set_timing();
return capability;
return 1;
}
static int reload_config(void)
@ -10373,7 +10373,7 @@ static int reload_config(void)
char *config = "iax.conf";
struct iax2_registry *reg;
if (set_config(config, 1) == 1) {
if (set_config(config, 1) > 0) {
prune_peers();
prune_users();
trunk_timed = trunk_untimed = 0;