aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--asn1/cmip/packet-cmip-template.c8
-rw-r--r--epan/dissectors/packet-cmip.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/asn1/cmip/packet-cmip-template.c b/asn1/cmip/packet-cmip-template.c
index fd40225e63..977c1c5819 100644
--- a/asn1/cmip/packet-cmip-template.c
+++ b/asn1/cmip/packet-cmip-template.c
@@ -98,23 +98,23 @@ static const char *objectclass_identifier_id;
static void
dissect_cmip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
{
- static struct SESSION_DATA_STRUCTURE* session = NULL;
+ static struct SESSION_DATA_STRUCTURE* session;
proto_item *item = NULL;
proto_tree *tree = NULL;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
+ session = (struct SESSION_DATA_STRUCTURE*)pinfo->private_data;
/* do we have spdu type from the session dissector? */
- if( !pinfo->private_data ){
+ if( !session ){
if(tree){
proto_tree_add_text(tree, tvb, 0, -1,
"Internal error:can't get spdu type from session dissector.");
return;
}
} else {
- session = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
- if(session->spdu_type == 0 ){
+ if(session->spdu_type == 0 ) {
if(tree){
proto_tree_add_text(tree, tvb, 0, -1,
"Internal error:wrong spdu type %x from session dissector.",session->spdu_type);
diff --git a/epan/dissectors/packet-cmip.c b/epan/dissectors/packet-cmip.c
index fca1b4dfa1..1c2e21a861 100644
--- a/epan/dissectors/packet-cmip.c
+++ b/epan/dissectors/packet-cmip.c
@@ -4394,23 +4394,23 @@ static void dissect_WeekMask_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, prot
static void
dissect_cmip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
{
- static struct SESSION_DATA_STRUCTURE* session = NULL;
+ static struct SESSION_DATA_STRUCTURE* session;
proto_item *item = NULL;
proto_tree *tree = NULL;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
+ session = (struct SESSION_DATA_STRUCTURE*)pinfo->private_data;
/* do we have spdu type from the session dissector? */
- if( !pinfo->private_data ){
+ if( !session ){
if(tree){
proto_tree_add_text(tree, tvb, 0, -1,
"Internal error:can't get spdu type from session dissector.");
return;
}
} else {
- session = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
- if(session->spdu_type == 0 ){
+ if(session->spdu_type == 0 ) {
if(tree){
proto_tree_add_text(tree, tvb, 0, -1,
"Internal error:wrong spdu type %x from session dissector.",session->spdu_type);