[asterisk-commits] qwell: trunk r82294 - /trunk/channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 12 16:55:33 CDT 2007


Author: qwell
Date: Wed Sep 12 16:55:32 2007
New Revision: 82294

URL: http://svn.digium.com/view/asterisk?view=rev&rev=82294
Log:
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.

Modified:
    trunk/channels/chan_iax2.c

Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=82294&r1=82293&r2=82294
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Wed Sep 12 16:55:32 2007
@@ -10007,7 +10007,7 @@
 	} 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 @@
 	}
 	ast_config_destroy(cfg);
 	set_timing();
-	return capability;
+	return 1;
 }
 
 static int reload_config(void)
@@ -10373,7 +10373,7 @@
 	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; 




More information about the asterisk-commits mailing list