diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2016-02-03 23:10:40 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-02-05 05:35:02 +0000 |
commit | cc679ca5ce9af9fb0dc9afe360d12654f6b4027a (patch) | |
tree | e68fdf9627cfbfbb4a827721d7a2db0d1f2cf421 /epan/column-utils.c | |
parent | 4c144c5d8c4c3f289a8b89a19bb9843cf9584d0e (diff) | |
download | wireshark-cc679ca5ce9af9fb0dc9afe360d12654f6b4027a.tar.gz |
Qt: Add check for field extractors
The proto tree is needed in several cases when using Lua field extractors,
because they fetch values from the tree. Without a valid field extractor
a Lua plugin may misbehave and display wrong column info.
This fixes column issues when:
- Calling resetColumns() in Qt. This involves adding a display filter,
change time display format, change name resolution and other changes
in UI which requires column updates.
- Print summary lines.
- Export as CSV and PSML.
Change-Id: Ieed6f8578cdf2759f1f836cd8413a4529b7bbd80
Reviewed-on: https://code.wireshark.org/review/13708
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/column-utils.c')
-rw-r--r-- | epan/column-utils.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/epan/column-utils.c b/epan/column-utils.c index ea932034b9..846c177c6b 100644 --- a/epan/column-utils.c +++ b/epan/column-utils.c @@ -43,6 +43,10 @@ #include <epan/dfilter/dfilter.h> #include <wsutil/utf8_entities.h> +#ifdef HAVE_LUA +#include <epan/wslua/wslua.h> +#endif + /* Allocate all the data structures for constructing column data, given the number of columns. */ void @@ -292,6 +296,16 @@ have_custom_cols(column_info *cinfo) return HAVE_CUSTOM_COLS(cinfo); } +gboolean +have_field_extractors(void) +{ +#ifdef HAVE_LUA + return wslua_has_field_extractors(); +#else + return FALSE; +#endif +} + /* search in edt tree custom fields */ void col_custom_set_edt(epan_dissect_t *edt, column_info *cinfo) { |