mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-11-04 05:15:22 +00:00 
			
		
		
		
	Remove some dead code and additionally handle a case that wasn't handled.
........ Merged revisions 377487 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 377504 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 377505 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377506 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		@@ -430,6 +430,9 @@ static int my_load_module(int reload)
 | 
			
		||||
	int res;
 | 
			
		||||
	struct ast_config *cfg;
 | 
			
		||||
	struct ast_variable *var;
 | 
			
		||||
	/* CONFIG_STATUS_FILEUNCHANGED is impossible when config_flags is always 0,
 | 
			
		||||
	 * and it has to be zero, so a reload can be sent to tell the driver to
 | 
			
		||||
	 * rescan the table layout. */
 | 
			
		||||
	struct ast_flags config_flags = { 0 };
 | 
			
		||||
	struct column *entry;
 | 
			
		||||
	char *temp;
 | 
			
		||||
@@ -445,11 +448,13 @@ static int my_load_module(int reload)
 | 
			
		||||
	 * have changed, which is not detectable by config file change detection,
 | 
			
		||||
	 * but should still cause the configuration to be re-parsed. */
 | 
			
		||||
	cfg = ast_config_load(config, config_flags);
 | 
			
		||||
	if (!cfg) {
 | 
			
		||||
	if (cfg == CONFIG_STATUS_FILEMISSING) {
 | 
			
		||||
		ast_log(LOG_WARNING, "Unable to load config for mysql CDR's: %s\n", config);
 | 
			
		||||
		return AST_MODULE_LOAD_SUCCESS;
 | 
			
		||||
	} else if (cfg == CONFIG_STATUS_FILEUNCHANGED)
 | 
			
		||||
		return AST_MODULE_LOAD_SUCCESS;
 | 
			
		||||
	} else if (cfg == CONFIG_STATUS_FILEINVALID) {
 | 
			
		||||
		ast_log(LOG_ERROR, "Unable to load configuration file '%s'\n", config);
 | 
			
		||||
		return AST_MODULE_LOAD_DECLINE;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (reload) {
 | 
			
		||||
		AST_RWLIST_WRLOCK(&columns);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user