From 6a90ea5cf443a67d04d816a13d786f769c2cfd54 Mon Sep 17 00:00:00 2001 From: Jason Parker Date: Wed, 12 Sep 2007 21:55:32 +0000 Subject: [PATCH] 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 --- channels/chan_iax2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 76cd655ae7..a238640bd0 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -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;