diff options
author | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2017-02-12 22:59:32 +0100 |
---|---|---|
committer | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2017-02-12 23:17:42 +0000 |
commit | ece6e7c1a4c2305ece68264810765d4e54ff9f49 (patch) | |
tree | c3473b6fbaafa5ccf972830f628ae9deba152739 | |
parent | ad2eb833c8f646c7bd8000dec30350f2fe743a33 (diff) |
Fix compilation without plugins.
proto.c:667:6: error: ‘dissector_plugins’ undeclared (first use in this function)
tap.c:773:20: error: ‘tap_plugins’ undeclared (first use in this function)
Change-Id: I8feaec4219dc97202bdb79d72399c5fd1d383e27
Reviewed-on: https://code.wireshark.org/review/20081
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
-rw-r--r-- | epan/proto.c | 15 | ||||
-rw-r--r-- | epan/tap.c | 15 |
2 files changed, 18 insertions, 12 deletions
diff --git a/epan/proto.c b/epan/proto.c index cb3ed93125..6484b6bab1 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -499,6 +499,13 @@ register_dissector_plugin_type(void) { add_plugin_type("dissector", check_for_dissector_plugin); } + +static void +dissector_plugin_destroy(gpointer p) +{ + g_free(p); +} + #endif /* HAVE_PLUGINS */ /* initialize data structures and register protocols and fields */ @@ -576,12 +583,6 @@ proto_init(void (register_all_protocols_func)(register_cb cb, gpointer client_da } static void -dissector_plugin_destroy(gpointer p) -{ - g_free(p); -} - -static void proto_cleanup_base(void) { protocol_t *protocol; @@ -664,10 +665,12 @@ proto_cleanup(void) { proto_cleanup_base(); +#ifdef HAVE_PLUGINS if (dissector_plugins) { g_slist_free_full(dissector_plugins, dissector_plugin_destroy); dissector_plugins = NULL; } +#endif } static gboolean diff --git a/epan/tap.c b/epan/tap.c index c10dff4f0d..3d61203587 100644 --- a/epan/tap.c +++ b/epan/tap.c @@ -177,6 +177,13 @@ register_all_plugin_tap_listeners(void) { g_slist_foreach(tap_plugins, register_tap_plugin_listener, NULL); } + +static void +tap_plugin_destroy(gpointer p) +{ + g_free(p); +} + #endif /* HAVE_PLUGINS */ /* ********************************************************************** @@ -744,12 +751,6 @@ union_of_tap_listener_flags(void) return flags; } -static void -tap_plugin_destroy(gpointer p) -{ - g_free(p); -} - void tap_cleanup(void) { volatile tap_listener_t *elem_lq; @@ -770,7 +771,9 @@ void tap_cleanup(void) g_free((gpointer)elem_dl); } +#ifdef HAVE_PLUGINS g_slist_free_full(tap_plugins, tap_plugin_destroy); +#endif } /* |