aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cdt.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-cdt.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-cdt.c')
-rw-r--r--epan/dissectors/packet-cdt.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/epan/dissectors/packet-cdt.c b/epan/dissectors/packet-cdt.c
index 7117e04954..fd22997a4b 100644
--- a/epan/dissectors/packet-cdt.c
+++ b/epan/dissectors/packet-cdt.c
@@ -81,8 +81,6 @@ static int hf_cdt_compressedContent = -1; /* CompressedContent */
/*--- End of included file: packet-cdt-hf.c ---*/
#line 61 "./asn1/cdt/packet-cdt-template.c"
-static dissector_handle_t data_handle = NULL;
-
/* Initialize the subtree pointers */
/*--- Included file: packet-cdt-ett.c ---*/
@@ -93,7 +91,7 @@ static gint ett_cdt_CompressedContentInfo = -1;
static gint ett_cdt_T_contentType = -1;
/*--- End of included file: packet-cdt-ett.c ---*/
-#line 66 "./asn1/cdt/packet-cdt-template.c"
+#line 64 "./asn1/cdt/packet-cdt-template.c"
static expert_field ei_cdt_unable_compress_content = EI_INIT;
static expert_field ei_cdt_unable_uncompress_content = EI_INIT;
@@ -272,7 +270,7 @@ dissect_cdt_CompressedContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
switch (content_type) {
case CDT_UNDEFINED:
- call_dissector (data_handle, next_tvb, actx->pinfo, top_tree);
+ call_data_dissector(next_tvb, actx->pinfo, top_tree);
break;
case CDT_EXTERNAL:
dissect_unknown_ber (actx->pinfo, next_tvb, 0, top_tree);
@@ -281,7 +279,7 @@ dissect_cdt_CompressedContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
dissect_p1_mts_apdu (next_tvb, actx->pinfo, top_tree, NULL);
break;
default:
- call_dissector (data_handle, next_tvb, actx->pinfo, top_tree);
+ call_data_dissector(next_tvb, actx->pinfo, top_tree);
break;
}
@@ -338,7 +336,7 @@ static int dissect_CompressedData_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_,
/*--- End of included file: packet-cdt-fn.c ---*/
-#line 71 "./asn1/cdt/packet-cdt-template.c"
+#line 69 "./asn1/cdt/packet-cdt-template.c"
/*--- proto_register_cdt -------------------------------------------*/
@@ -411,7 +409,7 @@ void proto_register_cdt (void) {
NULL, HFILL }},
/*--- End of included file: packet-cdt-hfarr.c ---*/
-#line 103 "./asn1/cdt/packet-cdt-template.c"
+#line 101 "./asn1/cdt/packet-cdt-template.c"
};
/* List of subtrees */
@@ -425,7 +423,7 @@ void proto_register_cdt (void) {
&ett_cdt_T_contentType,
/*--- End of included file: packet-cdt-ettarr.c ---*/
-#line 108 "./asn1/cdt/packet-cdt-template.c"
+#line 106 "./asn1/cdt/packet-cdt-template.c"
};
static ei_register_info ei[] = {
@@ -455,7 +453,5 @@ void proto_reg_handoff_cdt (void) {
/*--- End of included file: packet-cdt-dis-tab.c ---*/
-#line 131 "./asn1/cdt/packet-cdt-template.c"
-
- data_handle = find_dissector ("data");
+#line 129 "./asn1/cdt/packet-cdt-template.c"
}