diff options
author | krj <krj@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-09-06 06:33:13 +0000 |
---|---|---|
committer | krj <krj@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-09-06 06:33:13 +0000 |
commit | a50e2a1e991b92b0948039108c088e733faded73 (patch) | |
tree | 98281d4a0d3247b4fe94b234fead459725de1394 /epan/dissectors/packet-frame.c | |
parent | 3fcad2c110207e8a6bc8dc688a98e94795c067b1 (diff) |
The frame dissector disables the TRY_TO_FAKE_THIS_ITEM() optimization by marking the protocol tree as permamently visible. It only needs to disable the optimization temporarily while it creates the protocol item it intends to use proto_item_append_string() on
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29730 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-frame.c')
-rw-r--r-- | epan/dissectors/packet-frame.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c index 2a8d2614c9..2974168925 100644 --- a/epan/dissectors/packet-frame.c +++ b/epan/dissectors/packet-frame.c @@ -187,7 +187,8 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) expert_add_info_format(pinfo, NULL, PI_MALFORMED, PI_WARN, "Arrival Time: Fractional second out of range (0-1000000000)"); } else { - proto_tree *fh_tree; + proto_tree *fh_tree; + gboolean old_visible; /* Put in frame header information. */ cap_len = tvb_length(tvb); @@ -270,11 +271,11 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) * * See proto.h for details. */ - proto_tree_set_visible(fh_tree, TRUE); - - ti = proto_tree_add_string(fh_tree, hf_frame_protocols, tvb, - 0, 0, ""); + old_visible = proto_tree_set_visible(fh_tree, TRUE); + ti = proto_tree_add_string(fh_tree, hf_frame_protocols, tvb, 0, 0, ""); PROTO_ITEM_SET_GENERATED(ti); + proto_tree_set_visible(fh_tree, old_visible); + pinfo->layer_names = g_string_new(""); /* Check for existences of P2P pseudo header */ |