From 5d91b21281d84d89034f3bea079c54cb21dbdc1f Mon Sep 17 00:00:00 2001 From: wmeier Date: Sun, 31 Jul 2011 23:41:20 +0000 Subject: Restore saved 'pinfo->fragmented' as appropriate; Fixes gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38297 f5534014-38df-0310-8fa8-9805f1628bb7 --- epan/dissectors/packet-6lowpan.c | 4 ++++ epan/dissectors/packet-capwap.c | 5 ++++- epan/dissectors/packet-netbios.c | 1 + epan/dissectors/packet-tds.c | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/epan/dissectors/packet-6lowpan.c b/epan/dissectors/packet-6lowpan.c index 672d92b913..0988074b59 100644 --- a/epan/dissectors/packet-6lowpan.c +++ b/epan/dissectors/packet-6lowpan.c @@ -2124,6 +2124,8 @@ dissect_6lowpan_frag_first(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, "6LowPAN", frag_data, &lowpan_frag_items, NULL, tree); + pinfo->fragmented = save_fragmented; + /* If reassembly was successful, then return the completed datagram. */ if (new_tvb) { return new_tvb; @@ -2220,6 +2222,8 @@ dissect_6lowpan_frag_middle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) "6LowPAN", frag_data, &lowpan_frag_items, NULL, tree); + pinfo->fragmented = save_fragmented; + /* If reassembly was successful, then return the completed datagram. */ if (new_tvb) { return new_tvb; diff --git a/epan/dissectors/packet-capwap.c b/epan/dissectors/packet-capwap.c index e0889f4235..11d8ab1da2 100644 --- a/epan/dissectors/packet-capwap.c +++ b/epan/dissectors/packet-capwap.c @@ -46,7 +46,6 @@ static gboolean global_capwap_swap_frame_control = TRUE; static GHashTable *capwap_fragment_table = NULL; static GHashTable *capwap_reassembled_table = NULL; -static gboolean save_fragmented; /* TODO LIST ! * add decryption of DLTS Message @@ -1349,6 +1348,7 @@ dissect_capwap_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint32 fragment_id; guint32 fragment_offset; fragment_data *frag_msg = NULL; + gboolean save_fragmented; /* Make entries in Protocol column and Info column on summary display */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "CAPWAP"); @@ -1411,6 +1411,7 @@ dissect_capwap_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* CAPWAP Message Element */ offset += dissect_capwap_message_element(tvb, capwap_control_tree, offset); } + pinfo->fragmented = save_fragmented; } /* Code to actually dissect the packets */ @@ -1430,6 +1431,7 @@ dissect_capwap_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint32 fragment_id; guint32 fragment_offset; fragment_data *frag_msg = NULL; + gboolean save_fragmented; /* Make entries in Protocol column and Info column on summary display */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "CAPWAP"); @@ -1505,6 +1507,7 @@ dissect_capwap_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; } } + pinfo->fragmented = save_fragmented; } diff --git a/epan/dissectors/packet-netbios.c b/epan/dissectors/packet-netbios.c index 2b72afb790..caac7af1a0 100644 --- a/epan/dissectors/packet-netbios.c +++ b/epan/dissectors/packet-netbios.c @@ -1249,6 +1249,7 @@ dissect_netbios(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } break; } + pinfo->fragmented = save_fragmented; } } diff --git a/epan/dissectors/packet-tds.c b/epan/dissectors/packet-tds.c index 22d3b21aef..19ad0b0086 100644 --- a/epan/dissectors/packet-tds.c +++ b/epan/dissectors/packet-tds.c @@ -2374,6 +2374,7 @@ dissect_netlib_buffer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) next_tvb = tvb_new_subset_remaining (tvb, offset); call_dissector(data_handle, next_tvb, pinfo, tds_tree); } + pinfo->fragmented = save_fragmented; } static void -- cgit v1.2.3