diff options
author | Michael Mann <mmann78@netscape.net> | 2014-08-13 08:56:22 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-08-14 04:21:05 +0000 |
commit | d68d0e88b4924a610b5cd2fd3a748b00c9bbab1a (patch) | |
tree | f46c04238502faa689c173f1b8420c8d19d3c51e /epan/dissectors/packet-mac-lte.c | |
parent | f64421df3f230e89e0d83e327926f4c46fbd70dc (diff) | |
download | wireshark-d68d0e88b4924a610b5cd2fd3a748b00c9bbab1a.tar.gz |
Eliminate proto_tree_add_text from some dissectors.
Other minor cleanup while in the neighborhood.
Change-Id: If73a029f564219782c313d4154c24c7ce7458b52
Reviewed-on: https://code.wireshark.org/review/3574
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-mac-lte.c')
-rw-r--r-- | epan/dissectors/packet-mac-lte.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c index 51f306dc78..62ea587e68 100644 --- a/epan/dissectors/packet-mac-lte.c +++ b/epan/dissectors/packet-mac-lte.c @@ -312,6 +312,7 @@ static expert_field ei_mac_lte_rar_timing_advance_not_zero_warn = EI_INIT; static expert_field ei_mac_lte_dlsch_lcid = EI_INIT; static expert_field ei_mac_lte_padding_data_before_control_subheader = EI_INIT; static expert_field ei_mac_lte_rach_preamble_sent_warn = EI_INIT; +static expert_field ei_mac_lte_no_per_frame_data = EI_INIT; /* Constants and value strings */ @@ -5266,10 +5267,7 @@ int dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d /* Can't dissect anything without it... */ if (p_mac_lte_info == NULL) { - proto_item *tii = - proto_tree_add_text(mac_lte_tree, tvb, offset, -1, - "Can't dissect LTE MAC frame because no per-frame info was attached!"); - PROTO_ITEM_SET_GENERATED(tii); + proto_tree_add_expert(mac_lte_tree, pinfo, &ei_mac_lte_no_per_frame_data, tvb, offset, -1); return 0; } @@ -7138,6 +7136,7 @@ void proto_register_mac_lte(void) { &ei_mac_lte_context_rnti_type, { "mac-lte.rnti-type.invalid", PI_MALFORMED, PI_ERROR, "RNTI indicated, but value is not correct", EXPFILL }}, { &ei_mac_lte_ul_mac_frame_retx, { "mac-lte.ul-mac-frame-retx", PI_SEQUENCE, PI_WARN, "UL MAC frame ReTX", EXPFILL }}, { &ei_mac_lte_context_crc_status, { "mac-lte.crc-status.error", PI_MALFORMED, PI_ERROR, "Frame has CRC error problem", EXPFILL }}, + { &ei_mac_lte_no_per_frame_data, { "mac-lte.no_per_frame_data", PI_UNDECODED, PI_WARN, "Can't dissect LTE MAC frame because no per-frame info was attached!", EXPFILL }}, }; static const enum_val_t show_info_col_vals[] = { |