diff options
author | Michael Mann <mmann78@netscape.net> | 2016-03-19 20:33:14 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-03-20 17:38:03 +0000 |
commit | 1e60d63c8c6882c8c0bdb00cf6df594e1bb6fccf (patch) | |
tree | 4147c4f2bee3b93c250a49fa8ec337072c80e713 /epan/dissectors/packet-cisco-sm.c | |
parent | 2b2fc64447e5f778d969e6c850e9196d248cbbe1 (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-cisco-sm.c')
-rw-r--r-- | epan/dissectors/packet-cisco-sm.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/epan/dissectors/packet-cisco-sm.c b/epan/dissectors/packet-cisco-sm.c index b0cf5a68d9..b7c8e6f3bf 100644 --- a/epan/dissectors/packet-cisco-sm.c +++ b/epan/dissectors/packet-cisco-sm.c @@ -261,7 +261,6 @@ static gint ett_sm = -1; static dissector_handle_t sdp_handle; static dissector_handle_t mtp3_handle; static dissector_handle_t q931_handle; -static dissector_handle_t data_handle; /* Code to actually dissect the packets */ static int @@ -322,7 +321,7 @@ dissect_sm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) if ((msg_type == PDU_MTP3_TO_SLT || msg_type == PDU_MTP3_FROM_SLT)) { call_dissector(q931_handle, next_tvb, pinfo, tree); } else { - call_dissector(data_handle, next_tvb, pinfo, tree); + call_data_dissector(next_tvb, pinfo, tree); } } @@ -340,7 +339,7 @@ dissect_sm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) /* This should be the EISUP dissector but we haven't got one * right now - so decode it as data for now ... */ next_tvb = tvb_new_subset_length(tvb, offset, length); - call_dissector(data_handle, next_tvb, pinfo, sm_tree); + call_data_dissector(next_tvb, pinfo, sm_tree); break; case SM_PROTOCOL_X101: @@ -469,7 +468,7 @@ dissect_sm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) proto_tree_add_item(sm_tree, hf_sm_stat_request_type, tvb, offset, 4, ENC_BIG_ENDIAN); break; default: - call_dissector(data_handle, next_tvb, pinfo, tree); + call_data_dissector(next_tvb, pinfo, tree); } } } @@ -608,7 +607,6 @@ proto_reg_handoff_sm(void) sdp_handle = find_dissector_add_dependency("sdp", proto_sm); mtp3_handle = find_dissector_add_dependency("mtp3", proto_sm); q931_handle = find_dissector_add_dependency("q931", proto_sm); - data_handle = find_dissector("data"); } /* |