diff options
author | Michael Mann <mmann78@netscape.net> | 2016-03-16 09:02:52 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-03-20 12:48:48 +0000 |
commit | 9bcac48403de9aff6435d0f48028ae1f72f64528 (patch) | |
tree | 16989d2207299572c970a79b6d4c4037fa975c55 /epan/dissectors/packet-nstrace.c | |
parent | 6da50e2fde7b678cfbee922e3b12d588d75b6eef (diff) |
Manually add protocol dependencies derived from find_dissector.
Started by grepping call_dissector_with_data, call_dissector_only and call_dissector and traced the handles passed into them to a find_dissector within the dissector. Then replaced find_dissector with find_dissector_add_dependency and added the protocol id from the dissector.
"data" dissector was not considered to be a dependency.
Change-Id: I15d0d77301306587ef8e7af5876e74231816890d
Reviewed-on: https://code.wireshark.org/review/14509
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-nstrace.c')
-rw-r--r-- | epan/dissectors/packet-nstrace.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/epan/dissectors/packet-nstrace.c b/epan/dissectors/packet-nstrace.c index ce82163fe6..1d06450a4e 100644 --- a/epan/dissectors/packet-nstrace.c +++ b/epan/dissectors/packet-nstrace.c @@ -388,6 +388,8 @@ static const value_string ns_httpabortcode_vals[] = { }; static dissector_handle_t eth_withoutfcs_handle; +static dissector_handle_t http_handle; + void add35records(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *ns_tree); @@ -605,10 +607,8 @@ void add35records(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tre case NSREC_HTTP: /* Call HTTP dissector */ { - dissector_handle_t http_handle; tvbuff_t *next_tvb_http_client; morerecs=0; - http_handle = find_dissector("http"); next_tvb_http_client = tvb_new_subset_remaining(tvb, offset); call_dissector(http_handle, next_tvb_http_client, pinfo, tree); } @@ -1139,7 +1139,8 @@ void proto_reg_handoff_ns(void) { dissector_handle_t nstrace_handle; - eth_withoutfcs_handle = find_dissector("eth_withoutfcs"); + eth_withoutfcs_handle = find_dissector_add_dependency("eth_withoutfcs", proto_nstrace); + http_handle = find_dissector_add_dependency("http", proto_nstrace); nstrace_handle = create_dissector_handle(dissect_nstrace, proto_nstrace); dissector_add_uint("wtap_encap", WTAP_ENCAP_NSTRACE_1_0, nstrace_handle); |