aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-packetlogger.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-03-19 20:33:14 -0400
committerMichael Mann <mmann78@netscape.net>2016-03-20 17:38:03 +0000
commit1e60d63c8c6882c8c0bdb00cf6df594e1bb6fccf (patch)
tree4147c4f2bee3b93c250a49fa8ec337072c80e713 /epan/dissectors/packet-packetlogger.c
parent2b2fc64447e5f778d969e6c850e9196d248cbbe1 (diff)
Create call_data_dissector() to call data dissector.
This saves many dissectors the need to find the data dissector and store a handle to it. There were also some that were finding it, but not using it. For others this was the only reason for their handoff function, so it could be eliminated. Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b Reviewed-on: https://code.wireshark.org/review/14530 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-packetlogger.c')
-rw-r--r--epan/dissectors/packet-packetlogger.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/epan/dissectors/packet-packetlogger.c b/epan/dissectors/packet-packetlogger.c
index 8acd90e82b..fda23a74b9 100644
--- a/epan/dissectors/packet-packetlogger.c
+++ b/epan/dissectors/packet-packetlogger.c
@@ -46,8 +46,6 @@ static gint ett_packetlogger = -1;
static dissector_handle_t packetlogger_handle;
static dissector_table_t hci_h1_table;
-static dissector_handle_t data_handle;
-
#define PKT_HCI_COMMAND 0x00
#define PKT_HCI_EVENT 0x01
#define PKT_SENT_ACL_DATA 0x02
@@ -132,7 +130,7 @@ static int dissect_packetlogger(tvbuff_t *tvb, packet_info *pinfo,
col_add_fstr (pinfo->cinfo, COL_INFO, "%s", val_to_str(pl_type, type_vals, "Unknown 0x%02x"));
if (!dissector_try_uint_new(hci_h1_table, bthci.channel,
next_tvb, pinfo, tree, TRUE, bluetooth_data)) {
- call_dissector (data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
} else {
/* PacketLogger data */
@@ -144,7 +142,7 @@ static int dissect_packetlogger(tvbuff_t *tvb, packet_info *pinfo,
col_add_fstr (pinfo->cinfo, COL_INFO, "%s", tvb_format_stringzpad_wsp (next_tvb, 0, len));
break;
default:
- call_dissector (data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
col_add_fstr (pinfo->cinfo, COL_INFO, "Unknown 0x%02x", pl_type);
break;
}
@@ -177,7 +175,6 @@ void proto_register_packetlogger (void)
void proto_reg_handoff_packetlogger (void)
{
hci_h1_table = find_dissector_table("hci_h1.type");
- data_handle = find_dissector("data");
dissector_add_uint ("bluetooth.encap", WTAP_ENCAP_PACKETLOGGER, packetlogger_handle);
}