aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-x25.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-10-27 16:03:11 +0000
committerMichael Mann <mmann78@netscape.net>2013-10-27 16:03:11 +0000
commit471f21181b866fc1328b61a2ea4584b400388d7b (patch)
treed98992020277c9f9e591babddd359c8b03d9238b /epan/dissectors/packet-x25.c
parent394f67c1b7ab65b6fb89610ce251be62b8509208 (diff)
Have X.25 dissector pass boolean q_bit_set value through dissector data rather than pinfo->private_data.
Other "related" dissectors weren't manipulating pinfo->private_data, so it doesn't make sense for them to bother saving/restore it (now that q_bit_set isn't being used) svn path=/trunk/; revision=52894
Diffstat (limited to 'epan/dissectors/packet-x25.c')
-rw-r--r--epan/dissectors/packet-x25.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/epan/dissectors/packet-x25.c b/epan/dissectors/packet-x25.c
index 662ea531ba..3ce0232856 100644
--- a/epan/dissectors/packet-x25.c
+++ b/epan/dissectors/packet-x25.c
@@ -1284,7 +1284,7 @@ dissect_x25_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
guint x25_pkt_len;
int modulo;
guint16 vc;
- dissector_handle_t dissect = NULL;
+ dissector_handle_t dissect;
gboolean toa; /* TOA/NPI address format */
guint16 bytes0_1;
guint8 pkt_type;
@@ -1294,7 +1294,6 @@ dissect_x25_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
gboolean m_bit_set;
gint payload_len;
guint32 frag_key;
- void *saved_private_data;
fragment_head *fd_head;
@@ -1583,7 +1582,7 @@ dissect_x25_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
*/
dissect = dissector_get_uint_handle(x25_subdissector_table, spi);
if (dissect != NULL)
- x25_hash_add_proto_start(vc, pinfo->fd->num, dissect);
+ x25_hash_add_proto_start(vc, pinfo->fd->num, dissect);
}
/*
@@ -2020,14 +2019,10 @@ dissect_x25_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (!next_tvb)
next_tvb = tvb_new_subset_remaining(tvb, localoffset);
- saved_private_data = pinfo->private_data;
- pinfo->private_data = &q_bit_set;
-
/* See if there's already a dissector for this circuit. */
if (try_circuit_dissector(CT_X25, vc, pinfo->fd->num, next_tvb, pinfo,
- tree, NULL)) {
- pinfo->private_data = saved_private_data;
- return; /* found it and dissected it */
+ tree, &q_bit_set)) {
+ return; /* found it and dissected it */
}
/* Did the user suggest QLLC/SNA? */
@@ -2035,8 +2030,7 @@ dissect_x25_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Yes - dissect it as QLLC/SNA. */
if (!pinfo->fd->flags.visited)
x25_hash_add_proto_start(vc, pinfo->fd->num, qllc_handle);
- call_dissector(qllc_handle, next_tvb, pinfo, tree);
- pinfo->private_data = saved_private_data;
+ call_dissector_with_data(qllc_handle, next_tvb, pinfo, tree, &q_bit_set);
return;
}
@@ -2050,7 +2044,6 @@ dissect_x25_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (!pinfo->fd->flags.visited)
x25_hash_add_proto_start(vc, pinfo->fd->num, ositp_handle);
call_dissector(ositp_handle, next_tvb, pinfo, tree);
- pinfo->private_data = saved_private_data;
return;
}
}
@@ -2064,14 +2057,12 @@ dissect_x25_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (!pinfo->fd->flags.visited)
x25_hash_add_proto_start(vc, pinfo->fd->num, ip_handle);
call_dissector(ip_handle, next_tvb, pinfo, tree);
- pinfo->private_data = saved_private_data;
return;
case NLPID_ISO8473_CLNP:
if (!pinfo->fd->flags.visited)
x25_hash_add_proto_start(vc, pinfo->fd->num, clnp_handle);
call_dissector(clnp_handle, next_tvb, pinfo, tree);
- pinfo->private_data = saved_private_data;
return;
}
}
@@ -2079,13 +2070,11 @@ dissect_x25_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Try the heuristic dissectors. */
if (dissector_try_heuristic(x25_heur_subdissector_list, next_tvb, pinfo,
tree, NULL)) {
- pinfo->private_data = saved_private_data;
return;
}
/* All else failed; dissect it as raw data */
call_dissector(data_handle, next_tvb, pinfo, tree);
- pinfo->private_data = saved_private_data;
}
/*