From 6514dece0c755854081a0a0ccb525e6bc9dbbaff Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Thu, 16 Jul 2015 21:54:38 -0400 Subject: Add preference for disabling 'packet size limited during capture' message in Info column. Bug: 9827 Change-Id: I8fdba4827b164bd231981bfdd2e1bd0499f4f87c Reviewed-on: https://code.wireshark.org/review/9669 Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte Reviewed-by: Michael Mann --- epan/show_exception.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'epan/show_exception.c') diff --git a/epan/show_exception.c b/epan/show_exception.c index 7712b1e962..efc896db43 100644 --- a/epan/show_exception.c +++ b/epan/show_exception.c @@ -27,6 +27,8 @@ #include #include #include +#include +#include #include static int proto_short = -1; @@ -89,13 +91,28 @@ show_exception(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, break; case BoundsError: - col_append_str(pinfo->cinfo, COL_INFO, "[Packet size limited during capture]"); + { + gboolean display_info = TRUE; + module_t * frame_module = prefs_find_module("frame"); + if (frame_module != NULL) + { + pref_t *display_pref = prefs_find_preference(frame_module, "disable_packet_size_limited_in_summary"); + if (display_pref) + { + if (*display_pref->varp.boolp) + display_info = FALSE; + } + } + + if (display_info) + col_append_str(pinfo->cinfo, COL_INFO, "[Packet size limited during capture]"); proto_tree_add_protocol_format(tree, proto_short, tvb, 0, 0, "[Packet size limited during capture: %s truncated]", pinfo->current_proto); /* Don't record BoundsError exceptions as expert events - they merely * reflect a capture done with a snapshot length too short to capture * all of the packet * (any case where it's caused by something else is a bug). */ + } break; case FragmentBoundsError: -- cgit v1.2.3