mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-11-03 20:38:59 +00:00 
			
		
		
		
	modules: change module LOAD_FAILUREs to LOAD_DECLINES (14)
Change-Id: If99e3b4fc2d7e86fc3e61182aa6c835b407ed49e
This commit is contained in:
		@@ -312,21 +312,6 @@ static struct ast_format_def speex32_f = {
 | 
			
		||||
	.desc_size = sizeof(struct speex_desc),
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static int load_module(void)
 | 
			
		||||
{
 | 
			
		||||
	speex_f.format = ast_format_speex;
 | 
			
		||||
	speex16_f.format = ast_format_speex16;
 | 
			
		||||
	speex32_f.format = ast_format_speex32;
 | 
			
		||||
 | 
			
		||||
	if (ast_format_def_register(&speex_f) ||
 | 
			
		||||
	    ast_format_def_register(&speex16_f) ||
 | 
			
		||||
	    ast_format_def_register(&speex32_f)) {
 | 
			
		||||
		return AST_MODULE_LOAD_FAILURE;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return AST_MODULE_LOAD_SUCCESS;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int unload_module(void)
 | 
			
		||||
{
 | 
			
		||||
	int res = 0;
 | 
			
		||||
@@ -336,6 +321,22 @@ static int unload_module(void)
 | 
			
		||||
	return res;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int load_module(void)
 | 
			
		||||
{
 | 
			
		||||
	speex_f.format = ast_format_speex;
 | 
			
		||||
	speex16_f.format = ast_format_speex16;
 | 
			
		||||
	speex32_f.format = ast_format_speex32;
 | 
			
		||||
 | 
			
		||||
	if (ast_format_def_register(&speex_f) ||
 | 
			
		||||
	    ast_format_def_register(&speex16_f) ||
 | 
			
		||||
	    ast_format_def_register(&speex32_f)) {
 | 
			
		||||
		unload_module();
 | 
			
		||||
		return AST_MODULE_LOAD_DECLINE;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return AST_MODULE_LOAD_SUCCESS;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "OGG/Speex audio",
 | 
			
		||||
	.load = load_module,
 | 
			
		||||
	.unload = unload_module,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user