Ethereal-dev: Re: [ethereal-dev] plugin weirdness

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Nathan Neulinger <nneul@xxxxxxx>
Date: Sun, 30 Jan 2000 21:35:35 -0600
Ah. Found the problem. Ethereal is searching directories outside of
prefix for plugins. 

The plugin : gryphon.so, version 0.0.1, was found in
/usr/local/lib/ethereal/plugins/0.8
The plugin : gryphon.so, version 0.0.1 in
/products/ethereal/linux/lib/ethereal/plugins/0.8
was found in multiple directories

In my case /products/ethereal/linux/lib/ethereal is the same as
/usr/local/lib/ethereal. 

Not sure if this is a legit complaint or not. I personally am not too
keen on it having /usr/local/lib hardwired, when I have specifically
configured a prefix. Perhaps this should be a configure option that
would allow you to specify a list of directories to search in addition
to the plugins/version dir. Maybe even an associated environment
variable that could be set. 

-- Nathan

Olivier Abad wrote:
> 
> On dim, jan 30, 2000 at 11:16:30 -0600, Nathan Neulinger wrote:
> > Just noticed this, I'm getting a warning when starting ethereal:
> >
> > nneul(85)> ethereal The plugin : gryphon.so, version 0.0.1 was found
> > in multiple directories
> >
> > The only place it is installed is:
> >
> > /products/ethereal/linux/lib/ethereal/plugins/0.8
> > /products/ethereal/linux/lib/ethereal/plugins/0.8/gryphon.so
> > /products/ethereal/linux/lib/ethereal/plugins/0.8/gryphon.la
> > /products/ethereal/linux/lib/ethereal/plugins/0.8/gryphon.a
> >
> > I've deleted that whole dir and reran make install - it creates the
> > same files.
> >
> > Any idea what's up? This is on rh52.
> 
> This should really happen only if the same plugin (same name and
> version) was registered twice with add_plugin(). add_plugin() is called
> by plugins_scan_dir().
> Try the attached patch. It prints a message for each plugin which shows
> the directory where it was found.
> 
> Olivier
> 
> --- ethereal/plugins.c  Sun Jan 30 23:27:55 2000
> +++ ethereal.build/plugins.c    Sun Jan 30 23:30:29 2000
> @@ -398,8 +398,8 @@
>                                  protocol, filter_string, filter, dissector)))
>             {
>                 if (cr == EEXIST)
> -                   fprintf(stderr, "The plugin : %s, version %s\n"
> -                           "was found in multiple directories\n", name, version);
> +                   fprintf(stderr, "The plugin : %s, version %s in %s\n"
> +                           "was found in multiple directories\n", name, version, dirname);
>                 else
>                     fprintf(stderr, "Memory allocation problem\n"
>                             "when processing plugin %s, version %sn",
> @@ -409,6 +409,8 @@
>                 g_module_close(handle);
>                 continue;
>             }
> +           printf("The plugin : %s, version %s, was found in %s\n",
> +                  name, version, dirname);
>             if (statusfile) {
>                 check_plugin_status(file->d_name, version, handle,
>                                     filter_string, statusfile);
> 
> --
> Give me a sleeping pill and tell me your troubles.

-- 


------------------------------------------------------------
Nathan Neulinger                       EMail:  nneul@xxxxxxx
University of Missouri - Rolla         Phone: (573) 341-4841
CIS - Systems Programming                Fax: (573) 341-4216