[asterisk-dev] [svn-commits] junky: trunk r115594 - in /trunk/apps: app_jack.c app_skel.c

Russell Bryant russell at digium.com
Sat May 10 09:57:45 CDT 2008


SVN commits to the Digium repositories wrote:
> Author: junky
> Date: Fri May  9 22:28:50 2008
> New Revision: 115594
> 
> URL: http://svn.digium.com/view/asterisk?view=rev&rev=115594
> Log:
> ameliorate load and unload to dont use DECLINED or FAILED, when theres no .conf involved.

Please revert this change, as well.  Don't prevent modules from properly 
cleaning up, and modules should always return AST_MODULE_LOAD_ return values ...

> 
> 
> Modified:
>     trunk/apps/app_jack.c
>     trunk/apps/app_skel.c
> 
> Modified: trunk/apps/app_jack.c
> URL: http://svn.digium.com/view/asterisk/trunk/apps/app_jack.c?view=diff&rev=115594&r1=115593&r2=115594
> ==============================================================================
> --- trunk/apps/app_jack.c (original)
> +++ trunk/apps/app_jack.c Fri May  9 22:28:50 2008
> @@ -977,15 +977,12 @@
>  
>  static int load_module(void)
>  {
> -	if (ast_register_application(jack_app, jack_exec, jack_synopsis, jack_desc))
> -		return AST_MODULE_LOAD_DECLINE;
> -
> -	if (ast_custom_function_register(&jack_hook_function)) {
> -		ast_unregister_application(jack_app);
> -		return AST_MODULE_LOAD_DECLINE;
> -	}
> -
> -	return AST_MODULE_LOAD_SUCCESS;
> +	int res = 0;
> +
> +	res |= ast_register_application(jack_app, jack_exec, jack_synopsis, jack_desc);
> +	res |= ast_custom_function_register(&jack_hook_function);
> +
> +	return res;
>  }
>  
>  AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "JACK Interface");
> 
> Modified: trunk/apps/app_skel.c
> URL: http://svn.digium.com/view/asterisk/trunk/apps/app_skel.c?view=diff&rev=115594&r1=115593&r2=115594
> ==============================================================================
> --- trunk/apps/app_skel.c (original)
> +++ trunk/apps/app_skel.c Fri May  9 22:28:50 2008
> @@ -109,17 +109,12 @@
>  
>  static int unload_module(void)
>  {
> -	int res;
> -	res = ast_unregister_application(app);
> -	return res;	
> +	return ast_unregister_application(app);
>  }
>  
>  static int load_module(void)
>  {
> -	if (ast_register_application(app, app_exec, synopsis, descrip))
> -		return AST_MODULE_LOAD_DECLINE;
> -
> -	return AST_MODULE_LOAD_SUCCESS;
> +	return ast_register_application(app, app_exec, synopsis, descrip);
>  }
>  
>  AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Skeleton (sample) Application");
> 
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> svn-commits mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/svn-commits


-- 
Russell Bryant
Senior Software Engineer
Open Source Team Lead
Digium, Inc.



More information about the asterisk-dev mailing list