Re: [asterisk-dev] Asterisk - 13.6.0 - Registering OWN Module(Application):
On Tue, Dec 29, 2015 at 11:50 PM, Kirill Marchuk <62...@mail.ru> wrote: > Hi Boobalan > > Can you check your code against this one ? (pretty old, but still > relevant, I guess) > http://blog.russellbryant.net/2008/06/19/how-to-write-an-asterisk-module-part-1/ > > Especially, did you use one of the AST_MODULE_INFO macros ? > > Luck ! > > and Happy New Year! > > Kirill Marchuk > That blog post is still pretty accurate - we haven't changed the semantics of loading/registering a module much over the years. The code in loader.c tells you why this WARNING message is being raised: /* the dlopen() succeeded, let's find out if the module registered itself */ /* note that this will only work properly as long as ast_module_register() (which is called by the module's constructor) places the new module at the tail of the module_list */ if (resource_being_loaded != (mod = AST_DLLIST_LAST(_list))) { ast_log(LOG_WARNING, "Module '%s' did not register itself during load\n", resource_in); /* no, it did not, so close it and return */ logged_dlclose(resource_in, lib); /* note that the module's destructor will call ast_module_unregister(), which will free the structure we allocated in resource_being_loaded */ return NULL; } The module's constructor attributes are automatically added by the aforementioned AST_MODULE_INFO macros. Failure to add those will cause your module to not be registered, and hence not be loaded. -- Matthew Jordan Digium, Inc. | Director of Technology 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: http://digium.com & http://asterisk.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [asterisk-dev] Asterisk - 13.6.0 - Registering OWN Module(Application):
Hi Boobalan Can you check your code against this one ? (pretty old, but still relevant, I guess) http://blog.russellbryant.net/2008/06/19/how-to-write-an-asterisk-module-part-1/ Especially, did you use one of the AST_MODULE_INFO macros ? Luck ! and Happy New Year! Kirill Marchuk 30.12.2015 11:01, Boobalan M пишет: Hi Team, I have created new application named “plin_EXIBSInterface.c”. I could see application compilation, the module “plin_EXIBSInterface.so” getting moved to “/usr/lib64/asterisk/modules”/. When I make up the asterisk I could see the below error in logs, [Dec 29 15:17:27] WARNING[23213] loader.c: Module 'plin_EXIBSInterface.so' did not register itself during load [Dec 29 15:17:27] WARNING[23213] loader.c: Module 'plin_EXIBSInterface.so' could not be loaded. I have added the entry in modules.conf as well, but still issue persists. load => plin_EXIBSInterface.so ; Plintron Modules Can anyone suggests? Regards, Boobalan -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
[asterisk-dev] Asterisk - 13.6.0 - Registering OWN Module(Application):
Hi Team, I have created new application named "plin_EXIBSInterface.c". I could see application compilation, the module "plin_EXIBSInterface.so" getting moved to "/usr/lib64/asterisk/modules"/. When I make up the asterisk I could see the below error in logs, [Dec 29 15:17:27] WARNING[23213] loader.c: Module 'plin_EXIBSInterface.so' did not register itself during load [Dec 29 15:17:27] WARNING[23213] loader.c: Module 'plin_EXIBSInterface.so' could not be loaded. I have added the entry in modules.conf as well, but still issue persists. load => plin_EXIBSInterface.so ; Plintron Modules Can anyone suggests? Regards, Boobalan -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev