[asterisk-dev] Module 'app_gbox.so' could not be loaded.

Jeffrey C. Ollie jeff at ocjtech.us
Mon Jun 18 08:33:16 CDT 2007


On Mon, 2007-06-18 at 14:48 +0500, ast guy wrote:
> 
> ------------------------------------ ---- ------- - -  - - - - - -
> 
> static int unload_module(void)
> {
>     ast_log(LOG_VERBOSE, "unLoading GboX application \n");
>     ast_unregister_application(app);
>     ast_module_user_hangup_all();
>     return 0;
> }
> 
> static int load_module(void)
> {
>     int res = 0;
>     res = ast_register_application(app, gbox_exec, synopsis, descrip);
>     if (res) {
>         ast_log(LOG_ERROR, "Unable to register GboX application \n");
>     }
> 
>     return res;
> }
> 
> When I compile it outputs following errors
> 
> app_gbox.c:944: warning: 'unload_module' defined but not used
> app_gbox.c:954: warning: 'load_module' defined but not used
> 
> Any comments what am I missing for proper application registration.

You need something like this at the end of your file:

AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "GboX Application");

This will make the load_module and unload_module functions available to
Asterisk so that the module can be loaded/unloaded.

Jeff

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20070618/820a8cdc/attachment-0001.pgp 


More information about the asterisk-dev mailing list