diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-07-13 17:33:14 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-07-13 17:33:14 +0000 |
commit | ff08ff96988ddebb18d043623a17386d7593c603 (patch) | |
tree | 1b9eb8916a9dc267d47adc101e15bd42535fa780 /epan/dissectors/packet-hci_h4.c | |
parent | 7dfc9a4454cc4b80baa37a092497735c56288138 (diff) |
From Kovarththanan Rajaratnam:
hci_h4: Optimize column/field handling
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3703
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29082 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-hci_h4.c')
-rw-r--r-- | epan/dissectors/packet-hci_h4.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/epan/dissectors/packet-hci_h4.c b/epan/dissectors/packet-hci_h4.c index 99fb11ddb6..352e16f7a5 100644 --- a/epan/dissectors/packet-hci_h4.c +++ b/epan/dissectors/packet-hci_h4.c @@ -68,11 +68,8 @@ dissect_hci_h4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_item *ti=NULL; proto_tree *hci_h4_tree=NULL; - if(check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "HCI H4"); - - if(check_col(pinfo->cinfo, COL_INFO)) - col_clear(pinfo->cinfo, COL_INFO); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "HCI H4"); + col_clear(pinfo->cinfo, COL_INFO); type = tvb_get_guint8(tvb, 0); @@ -81,23 +78,18 @@ dissect_hci_h4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) hci_h4_tree = proto_item_add_subtree(ti, ett_hci_h4); } - if(check_col(pinfo->cinfo, COL_INFO)){ - col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s",pinfo->p2p_dir==P2P_DIR_SENT?"Sent":"Rcvd",val_to_str(type, hci_h4_type_vals, "Unknown 0x%02x")); - } ti=proto_tree_add_uint(hci_h4_tree, hf_hci_h4_direction, tvb, 0, 0, pinfo->p2p_dir); PROTO_ITEM_SET_GENERATED(ti); - proto_item_append_text(hci_h4_tree, " %s %s", val_to_str(pinfo->p2p_dir, hci_h4_direction_vals, "0x%02x"), val_to_str(type, hci_h4_type_vals, "Unknown 0x%02x")); proto_tree_add_item(hci_h4_tree, hf_hci_h4_type, tvb, 0, 1, TRUE); next_tvb = tvb_new_subset(tvb, 1, -1, -1); if(!dissector_try_port(hci_h4_table, type, next_tvb, pinfo, tree)) { -/* - if(check_col(pinfo->cinfo, COL_INFO)){ - col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown HCI H4 payload type 0x%02x", type); - } -*/ + col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s", + pinfo->p2p_dir==P2P_DIR_SENT ? "Sent" : "Rcvd", + val_to_str(type, hci_h4_type_vals, "Unknown 0x%02x")); + call_dissector(data_handle, next_tvb, pinfo, tree); } } |