Hello everybody, I have made a application of my own. (I.e. Def ( )). I am able to compile the application successfully. And the .so file is created as well. But when I load asterisk I get the following error. [Def.so]Jul 1 19:20:06 WARNING[15664]: loader.c:295 ast_load_resource: No key routine in module /usr/lib/asterisk/modules/Def.so Jul 1 19:20:06 WARNING[15664]: loader.c:302 ast_load_resource: Key routine returned NULL in module /usr/lib/asterisk/modules/Def.so Jul 1 19:20:06 WARNING[15664]: loader.c:311 ast_load_resource: 2 error(s) loading module /usr/lib/asterisk/modules/Def.so, aborted Jul 1 19:20:06 WARNING[15664]: loader.c:440 load_modules: Loading module Def.so failed! So if anybody could help me out as to where must I be going wrong, it would be very kind of you. Regards, Bharat M. Sarvan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050701/f437ac68/attachment.htm
may be reading include/asterisk/module.h you can find the answer. May be this? /*! Returns the ASTERISK_GPL_KEY */ /*! * This returns the ASTERISK_GPL_KEY, signifiying that you agree to the terms of * the GPL stated in the ASTERISK_GPL_KEY. Your module will not load if it does * not return the EXACT message, i.e. char *key(void){return ASTERISK_GPL_KEY;} */ char *key(void); /*! Return the below mentioned key, unmodified */ may be you missed to specify that function best regards On 6/1/05, Bharat M. Sarvan <bharat.sarvan@ezzibpo.com> wrote:> > > > Hello everybody, > > I have made a application of my own. (I.e. Def ( > )). I am able to compile the application successfully. And the .so file is > created as well. But when I load asterisk I get the following error. > > > > > > [Def.so]Jul 1 19:20:06 WARNING[15664]: loader.c:295 ast_load_resource: No > key routine in module /usr/lib/asterisk/modules/Def.so > > Jul 1 19:20:06 WARNING[15664]: loader.c:302 ast_load_resource: Key routine > returned NULL in module /usr/lib/asterisk/modules/Def.so > > Jul 1 19:20:06 WARNING[15664]: loader.c:311 ast_load_resource: 2 error(s) > loading module /usr/lib/asterisk/modules/Def.so, aborted > > Jul 1 19:20:06 WARNING[15664]: loader.c:440 load_modules: Loading module > Def.so failed! > > > > > > > > So if anybody could help me out as to where must I be going wrong, it would > be very kind of you. > > > > > > > > > > Regards, > > Bharat M. Sarvan > > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > > http://lists.digium.com/mailman/listinfo/asterisk-users > >-- "Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"
Bharat M. Sarvan wrote:> Hello everybody, > > I have made a application of my own. (I.e. Def ( )). I am able to > compile the application successfully. And the .so file is created as > well. But when I load asterisk I get the following error. >> [Def.so]Jul 1 19:20:06 WARNING[15664]: loader.c:295 > ast_load_resource: No key routine in module > /usr/lib/asterisk/modules/Def.soYou need to return the Asterisk GPL Key, have a look at app_skel.c (if I remember correctly). I.E.: char *key() { return ASTERISK_GPL_KEY; } And from module.h: #define ASTERISK_GPL_KEY \ "This paragraph is Copyright (C) 2000, Linux Support Services, Inc. \ In order for your module to load, it must return this key via a function \ called \"key\". Any code which includes this paragraph must be licensed under \ the GNU General Public License version 2 or later (at your option). Linux \ Support Services, Inc. reserves the right to allow other parties to license \ this paragraph under other terms as well." (Sorry about the line wrapping) -- Cheers, Matt Riddell _______________________________________________ http://www.sineapps.com/news.php (Daily Asterisk News - html) http://www.sineapps.com/rssfeed.php (Daily Asterisk News - rss)