aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil/plugins.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-09-06 10:14:12 -0700
committerGuy Harris <guy@alum.mit.edu>2016-09-06 17:14:45 +0000
commit295dbc609dab17d396a69e460ac956151d3ef32d (patch)
tree5d892582cf0f7542f5eee289ab995535dce6dfa8 /wsutil/plugins.c
parent7a674c006b3d09735c9340ad74f02556fbd91cbd (diff)
Suppress another warning if told not to report failures.
That's another failure that can occur if you're trying to load a libwireshark plugin in a program that doesn't use libwireshark if, for example, references to an undefined symbol don't prevent the module from being loaded in the first place. Change-Id: I21629c0094fdca7dfbd88f39b7e6c10fb600b401 Reviewed-on: https://code.wireshark.org/review/17537 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wsutil/plugins.c')
-rw-r--r--wsutil/plugins.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/wsutil/plugins.c b/wsutil/plugins.c
index f2da1f57d2..5bb530dd23 100644
--- a/wsutil/plugins.c
+++ b/wsutil/plugins.c
@@ -219,9 +219,24 @@ plugins_scan_dir(const char *dirname, plugin_load_failure_mode mode)
{
/*
* No.
+ *
+ * Only report this failure if we were asked to; it might
+ * just mean that it's a plugin type that this program
+ * doesn't support, such as a libwireshark plugin in
+ * a program that doesn't use libwireshark.
+ *
+ * XXX - we really should put different types of plugins
+ * (libwiretap, libwireshark) in different subdirectories,
+ * give libwiretap and libwireshark init routines that
+ * load the plugins, and have them scan the appropriate
+ * subdirectories so tha we don't even *try* to, for
+ * example, load libwireshark plugins in programs that
+ * only use libwiretap.
*/
- report_failure("The plugin '%s' has no registration routines",
- name);
+ if (mode == REPORT_LOAD_FAILURE) {
+ report_failure("The plugin '%s' has no registration routines",
+ name);
+ }
g_module_close(handle);
g_free(new_plug->name);
g_free(new_plug);