From e72d4317ede4d05741fce85872744f8962a64648 Mon Sep 17 00:00:00 2001 From: Laurent Deniel Date: Fri, 18 Aug 2000 14:22:20 +0000 Subject: [PATCH] - move some #preprocessor directives at the fisrt column. - do not silently ignore plugins with incomplete symbols or non compilable filter (but report the error to the user). svn path=/trunk/; revision=2291 --- plugins.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/plugins.c b/plugins.c index 9988ff7ba7..14c395b06e 100644 --- a/plugins.c +++ b/plugins.c @@ -1,7 +1,7 @@ /* plugins.c * plugin routines * - * $Id: plugins.c,v 1.21 2000/08/11 13:34:47 deniel Exp $ + * $Id: plugins.c,v 1.22 2000/08/18 14:22:20 deniel Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -275,11 +275,11 @@ save_plugin_status() if (!statusfile) { pf_path = g_malloc(strlen(get_home_dir()) + strlen(PF_DIR) + 2); sprintf(pf_path, "%s/%s", get_home_dir(), PF_DIR); - #ifdef WIN32 +#ifdef WIN32 mkdir(pf_path); - #else +#else mkdir(pf_path, 0755); - #endif +#endif g_free(pf_path); statusfile=fopen(plugin_status_file, "w"); if (!statusfile) return -1; @@ -396,26 +396,31 @@ plugins_scan_dir(const char *dirname) name = (gchar *)file->d_name; if (g_module_symbol(handle, "version", (gpointer*)&version) == FALSE) { + g_warning("The plugin %s has no version symbol", name); g_module_close(handle); continue; } if (g_module_symbol(handle, "protocol", (gpointer*)&protocol) == FALSE) { + g_warning("The plugin %s has no protocol symbol", name); g_module_close(handle); continue; } if (g_module_symbol(handle, "filter_string", (gpointer*)&filter_string) == FALSE) { + g_warning("The plugin %s has no filter_string symbol", name); g_module_close(handle); continue; } if (dfilter_compile(filter_string, &filter) != 0) { + g_warning("The plugin %s has a non compilable filter", name); g_module_close(handle); continue; } if (g_module_symbol(handle, "dissector", (gpointer*)&dissector) == FALSE) { if (filter != NULL) dfilter_destroy(filter); + g_warning("The plugin %s has no dissector symbol", name); g_module_close(handle); continue; }