aboutsummaryrefslogtreecommitdiffstats
path: root/epan/show_exception.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-07-16 21:54:38 -0400
committerMichael Mann <mmann78@netscape.net>2015-07-17 11:29:08 +0000
commit6514dece0c755854081a0a0ccb525e6bc9dbbaff (patch)
tree8f0628b76ec4ff887374cd6068610587d450ed10 /epan/show_exception.c
parentb1eaf29d4056f05d1bd6a7f3d692553ec069a228 (diff)
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 <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/show_exception.c')
-rw-r--r--epan/show_exception.c19
1 files changed, 18 insertions, 1 deletions
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 <epan/packet.h>
#include <epan/exceptions.h>
#include <epan/expert.h>
+#include <epan/prefs.h>
+#include <epan/prefs-int.h>
#include <epan/show_exception.h>
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: