diff options
author | AndersBroman <anders.broman@ericsson.com> | 2017-08-29 17:29:20 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-08-29 16:17:35 +0000 |
commit | 37d06faed3bc3c4d8ff908993b5f9cfb91e3c1a4 (patch) | |
tree | 401b3087039d8be14ad290c764567dee1a74adf5 /epan/dissectors/packet-ansi_tcap.c | |
parent | 64eea6bb03ec8b861c5e336815e5a6b8233aadcd (diff) |
[ANSI TCAP] Get rid of global variable top_tree.
Change-Id: Ib3f7794be4c8f38ce556d2e4d61f7df02ba8df1e
Reviewed-on: https://code.wireshark.org/review/23291
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ansi_tcap.c')
-rw-r--r-- | epan/dissectors/packet-ansi_tcap.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/epan/dissectors/packet-ansi_tcap.c b/epan/dissectors/packet-ansi_tcap.c index 753cb18e6b..0e039d27a3 100644 --- a/epan/dissectors/packet-ansi_tcap.c +++ b/epan/dissectors/packet-ansi_tcap.c @@ -191,9 +191,6 @@ struct tcapsrt_info_t tcapsrt_global_info[MAX_TCAP_INSTANCE]; static dissector_table_t ber_oid_dissector_table=NULL; static const char * cur_oid; static const char * tcapext_oid; -static proto_tree * tcap_top_tree=NULL; -static proto_tree * tcap_stat_tree=NULL; -static proto_item * tcap_stat_item=NULL; static dissector_handle_t ansi_map_handle; @@ -373,7 +370,7 @@ find_tcap_subdissector(tvbuff_t *tvb, asn1_ctx_t *actx, proto_tree *tree){ /* national */ guint8 family = (ansi_tcap_private.d.OperationCode_national & 0x7f00)>>8; guint8 specifier = (guint8)(ansi_tcap_private.d.OperationCode_national & 0xff); - if(!dissector_try_uint(ansi_tcap_national_opcode_table, ansi_tcap_private.d.OperationCode_national, tvb, actx->pinfo, tcap_top_tree)){ + if(!dissector_try_uint(ansi_tcap_national_opcode_table, ansi_tcap_private.d.OperationCode_national, tvb, actx->pinfo, actx->subtree.top_tree)){ proto_tree_add_expert_format(tree, actx->pinfo, &ei_ansi_tcap_dissector_not_implemented, tvb, 0, -1, "Dissector for ANSI TCAP NATIONAL code:0x%x(Family %u, Specifier %u) \n" "not implemented. Contact Wireshark developers if you want this supported(Spec required)", @@ -400,7 +397,7 @@ find_tcap_subdissector(tvbuff_t *tvb, asn1_ctx_t *actx, proto_tree *tree){ * Operation Family is coded as decimal 9. Bit H of the Operation Family is always * coded as 0. */ - call_dissector_with_data(ansi_map_handle, tvb, actx->pinfo, tcap_top_tree, &ansi_tcap_private); + call_dissector_with_data(ansi_map_handle, tvb, actx->pinfo, actx->subtree.top_tree, &ansi_tcap_private); return TRUE; } @@ -1375,7 +1372,7 @@ dissect_ansi_tcap_PackageType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int /*--- End of included file: packet-ansi_tcap-fn.c ---*/ -#line 318 "./asn1/ansi_tcap/packet-ansi_tcap-template.c" +#line 315 "./asn1/ansi_tcap/packet-ansi_tcap-template.c" @@ -1397,15 +1394,13 @@ dissect_ansi_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, vo asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); ansi_tcap_ctx_init(&ansi_tcap_private); - tcap_top_tree = parent_tree; + asn1_ctx.subtree.top_tree = parent_tree; col_set_str(pinfo->cinfo, COL_PROTOCOL, "ANSI TCAP"); /* create display subtree for the protocol */ if(parent_tree){ item = proto_tree_add_item(parent_tree, proto_ansi_tcap, tvb, 0, -1, ENC_NA); tree = proto_item_add_subtree(item, ett_tcap); - tcap_stat_item=item; - tcap_stat_tree=tree; } cur_oid = NULL; tcapext_oid = NULL; @@ -1719,7 +1714,7 @@ proto_register_ansi_tcap(void) NULL, HFILL }}, /*--- End of included file: packet-ansi_tcap-hfarr.c ---*/ -#line 453 "./asn1/ansi_tcap/packet-ansi_tcap-template.c" +#line 448 "./asn1/ansi_tcap/packet-ansi_tcap-template.c" }; /* Setup protocol subtree array */ @@ -1757,7 +1752,7 @@ proto_register_ansi_tcap(void) &ett_ansi_tcap_T_paramSet, /*--- End of included file: packet-ansi_tcap-ettarr.c ---*/ -#line 464 "./asn1/ansi_tcap/packet-ansi_tcap-template.c" +#line 459 "./asn1/ansi_tcap/packet-ansi_tcap-template.c" }; static ei_register_info ei[] = { |