aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/pres/pres.cnf
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-11-05 18:47:26 +0000
committerMichael Mann <mmann78@netscape.net>2013-11-05 18:47:26 +0000
commitb6b78d69dbae80ea0a0efc39400e3e88d5f9e337 (patch)
tree3b236e73ee8f1d83c07ecc5ab7a67af8bb19cc85 /asn1/pres/pres.cnf
parent389423aaaac460f5b0fcbaf37b4f3d5cd7941c5b (diff)
In an effort to reduce the use of pinfo->private_data (and some true global variables), I converted the ASN.1 dissectors that use pinfo->private_data to exchange a SESSION_DATA_STRUCTURE to instead only exchange it in the context of ASN.1. This meant converting dissectors to the "new" style to pass the SESSION_DATA_STRUCTURE as well as providing a pointer to it in asn1_ctx_t.private_data. Yes, it's still "private data", but it's not used by all dissectors like pinfo->private data is.
svn path=/trunk/; revision=53090
Diffstat (limited to 'asn1/pres/pres.cnf')
-rw-r--r--asn1/pres/pres.cnf5
1 files changed, 3 insertions, 2 deletions
diff --git a/asn1/pres/pres.cnf b/asn1/pres/pres.cnf
index 414b3b958d..194d2d9c8d 100644
--- a/asn1/pres/pres.cnf
+++ b/asn1/pres/pres.cnf
@@ -41,7 +41,7 @@ CPR-PPDU/normal-mode-parameters/provider-reason cPR_PPDU__provider-reason
oid=find_oid_by_pres_ctx_id(actx->pinfo, presentation_context_identifier);
if(oid){
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_ber_oid_callback(oid, next_tvb, offset, actx->pinfo, global_tree, NULL);
+ call_ber_oid_callback(oid, next_tvb, offset, actx->pinfo, global_tree, actx->private_data);
} else {
proto_tree_add_expert(tree, actx->pinfo, &ei_pres_dissector_not_available,
tvb, offset, -1);
@@ -55,7 +55,7 @@ CPR-PPDU/normal-mode-parameters/provider-reason cPR_PPDU__provider-reason
oid=find_oid_by_pres_ctx_id(actx->pinfo, presentation_context_identifier);
if(oid){
dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &next_tvb);
- call_ber_oid_callback(oid, next_tvb, offset, actx->pinfo, global_tree, NULL);
+ call_ber_oid_callback(oid, next_tvb, offset, actx->pinfo, global_tree, actx->private_data);
} else {
proto_tree_add_expert(tree, actx->pinfo, &ei_pres_dissector_not_available,
tvb, offset, -1);
@@ -72,6 +72,7 @@ CPR-PPDU/normal-mode-parameters/provider-reason cPR_PPDU__provider-reason
#.FN_BODY Presentation-context-identifier
const char *name;
char *oid;
+ struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE*)actx->private_data;
%(DEFAULT_BODY)s