aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btrfcomm.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-btrfcomm.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-btrfcomm.c')
-rw-r--r--epan/dissectors/packet-btrfcomm.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/epan/dissectors/packet-btrfcomm.c b/epan/dissectors/packet-btrfcomm.c
index 84fe745b7d..a36403769f 100644
--- a/epan/dissectors/packet-btrfcomm.c
+++ b/epan/dissectors/packet-btrfcomm.c
@@ -156,7 +156,6 @@ static uat_field_t uat_rfcomm_channels_fields[] = {
UAT_END_FIELDS
};
-static dissector_handle_t data_handle;
static dissector_handle_t ppp_handle;
static const value_string vs_ctl_pn_i[] = {
@@ -872,7 +871,7 @@ dissect_btrfcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
call_dissector_with_data(decode_by_dissector, next_tvb, pinfo, tree, rfcomm_data);
} else {
/* unknown service, let the data dissector handle it */
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
}
@@ -1178,8 +1177,6 @@ proto_reg_handoff_btrfcomm(void)
{
dissector_add_uint("btl2cap.psm", BTL2CAP_PSM_RFCOMM, btrfcomm_handle);
dissector_add_for_decode_as("btl2cap.cid", btrfcomm_handle);
-
- data_handle = find_dissector("data");
}
/* Bluetooth Dial-Up Networking (DUN) profile dissection */
@@ -1221,7 +1218,7 @@ dissect_btdun(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PPP");
col_add_fstr(pinfo->cinfo, COL_INFO, "%s <PPP frame>", (pinfo->p2p_dir == P2P_DIR_SENT) ? "Sent" : "Rcvd");
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
}