diff options
author | Michael Mann <mmann78@netscape.net> | 2013-05-01 20:54:31 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-05-01 20:54:31 +0000 |
commit | b787f03df35e6ea3112014227b3078affa1768b3 (patch) | |
tree | e4bbc68759a801777337eb9bb2399f03cf274073 /epan/dissectors/packet-cmp.c | |
parent | bf579224ae30b015206d602d976998c8bbab06f3 (diff) |
Remove some global variables in favor of private_data member of asn1_ctx_t. Bug 7060 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7060). This should (mostly) passify the bug, but it appears like this could be done with a lot more ASN.1 dissectors.
svn path=/trunk/; revision=49117
Diffstat (limited to 'epan/dissectors/packet-cmp.c')
-rw-r--r-- | epan/dissectors/packet-cmp.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/epan/dissectors/packet-cmp.c b/epan/dissectors/packet-cmp.c index 8b639df01c..2c234c592a 100644 --- a/epan/dissectors/packet-cmp.c +++ b/epan/dissectors/packet-cmp.c @@ -295,10 +295,6 @@ static gint ett_cmp_PollRepContent_item = -1; /*--- End of included file: packet-cmp-ett.c ---*/ #line 74 "../../asn1/cmp/packet-cmp-template.c" -static const char *object_identifier_id; - - - /*--- Included file: packet-cmp-fn.c ---*/ #line 1 "../../asn1/cmp/packet-cmp-fn.c" /*--- Cyclic dependencies ---*/ @@ -390,7 +386,7 @@ dissect_cmp_PKIFreeText(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset static int dissect_cmp_T_infoType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_cmp_type_oid, &object_identifier_id); + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_cmp_type_oid, (const char**)&actx->private_data); return offset; } @@ -400,7 +396,7 @@ dissect_cmp_T_infoType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset static int dissect_cmp_T_infoValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 90 "../../asn1/cmp/cmp.cnf" - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback((const char*)actx->private_data, tvb, offset, actx->pinfo, tree); @@ -1457,7 +1453,7 @@ static void dissect_SuppLangTagsValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo /*--- End of included file: packet-cmp-fn.c ---*/ -#line 79 "../../asn1/cmp/packet-cmp-template.c" +#line 75 "../../asn1/cmp/packet-cmp-template.c" static int dissect_cmp_pdu(tvbuff_t *tvb, proto_tree *tree, asn1_ctx_t *actx) @@ -2347,7 +2343,7 @@ void proto_register_cmp(void) { NULL, HFILL }}, /*--- End of included file: packet-cmp-hfarr.c ---*/ -#line 336 "../../asn1/cmp/packet-cmp-template.c" +#line 332 "../../asn1/cmp/packet-cmp-template.c" }; /* List of subtrees */ @@ -2405,7 +2401,7 @@ void proto_register_cmp(void) { &ett_cmp_PollRepContent_item, /*--- End of included file: packet-cmp-ettarr.c ---*/ -#line 342 "../../asn1/cmp/packet-cmp-template.c" +#line 338 "../../asn1/cmp/packet-cmp-template.c" }; module_t *cmp_module; @@ -2499,7 +2495,7 @@ void proto_reg_handoff_cmp(void) { /*--- End of included file: packet-cmp-dis-tab.c ---*/ -#line 414 "../../asn1/cmp/packet-cmp-template.c" +#line 410 "../../asn1/cmp/packet-cmp-template.c" inited = TRUE; } |