On Mon, Jan 28, 2013 at 5:33 AM, Sonny Karlsson <[email protected]> wrote:

> Hi
>
> Should we have this trace message? It does generates a 20-30 lines of
> extra trace at startup, but it could make it easier to see which plugin
> functions can't be loaded and such.
>
> On Sun, Jan 27, 2013 at 07:44:26PM +0100, Sonny Karlsson wrote:
> > Print the error message returned from dlerror as trace.
> >
> > --
> > Sonny Karlsson
>
> > From 90bcb6eb9e36d3a6df38d503c1cc393cae73ee46 Mon Sep 17 00:00:00 2001
> > From: Sonny Karlsson <[email protected]>
> > Date: Sun, 27 Jan 2013 19:04:50 +0100
> > Subject: [PATCH 1/2] plugin: Add mk_plugin_load_symbol trace message.
> >
> >
> > Signed-off-by: Sonny Karlsson <[email protected]>
> > ---
> >  src/mk_plugin.c |    6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/mk_plugin.c b/src/mk_plugin.c
> > index 37ed98f..9e2e465 100644
> > --- a/src/mk_plugin.c
> > +++ b/src/mk_plugin.c
> > @@ -68,12 +68,14 @@ void *mk_plugin_load(const char *path)
> >
> >  void *mk_plugin_load_symbol(void *handler, const char *symbol)
> >  {
> > -    char *err;
> > +    const char *err;
> >      void *s;
> >
> >      dlerror();
> >      s = dlsym(handler, symbol);
> > -    if (dlerror() != NULL) {
> > +    err = dlerror();
> > +    if (err) {
> > +        MK_TRACE("dlsym on '%s' failed: %s", symbol, err);
> >          return NULL;
> >      }
> >
> > --
> > 1.7.10.4
> >
>
>
> --
> Sonny Karlsson
> _______________________________________________
> Monkey mailing list
> [email protected]
> http://lists.monkey-project.com/listinfo/monkey
>

i dont think so. Because missing symbols are expected as not all plugins
implements all callbacks.

-- 
Eduardo Silva
http://edsiper.linuxchile.cl
http://www.monkey-project.com
_______________________________________________
Monkey mailing list
[email protected]
http://lists.monkey-project.com/listinfo/monkey

Reply via email to