[Olsr-dev] Problem loading plugin with current tip

Henning Rogge (spam-protected)
Tue Jul 14 20:13:30 CEST 2009


Am Dienstag 14 Juli 2009 17:21:58 schrieben Sie:
> > I fixed the problem my self looking at the changes into the olsrtxt
> > plugin... but I did some punk cut & paste without really understanding
> > ;) So if there is some reference documentation for the new plugin
> > interface please give me the pointer to it :)
>
> Okay... it's strange because I designed the new plugin loader to be
> backward compatible with the old plugins and tested it with one of them...
> will have to do some more tests.
I think I found the problem with the "incompatible" plugin...

olsrd_plugin_init() says

....
* Return     : fail (0) or success (1)
....

but your InitOBAMP() function was returning 0 if it was working. I know, the 
"0 = fail, 1 = success" encoding is insane (that's why I changed it in plugin 
version 6), but I built in a "compatiblity layer" for the old system.

I just don't know why your plugin ever worked with this return value, because 
the corresponding old plugin loader code said:

/* Initialize the plugin */
  if (init_olsr_plugin(plugin) != 0) {
    const int save_errno = errno;
    dlclose(plugin->dlhandle);
    free(plugin);
    errno = save_errno;
    OLSR_ERROR(LOG_PLUGINS, "---------- LIBRARY %s FAILED ----------\n\n", 
libname);
    return -1;
  }

So, it should have failed...

Do you have an idea what happend ?

Henning

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20090714/e4dbb677/attachment.sig>


More information about the Olsr-dev mailing list