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(&module_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