aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-json.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-11-22 19:24:06 -0500
committerAnders Broman <a.broman58@gmail.com>2014-11-25 15:19:52 +0000
commit152b0c92d658991b5a8742802a1f8412848de964 (patch)
treec405423a4037171e97ab0970782ce868e4029c28 /epan/dissectors/packet-json.c
parente3a04bb392824781b8a3ef6ec98a37ef96c6c827 (diff)
Remove support for pinfo->private_data in "data-text-lines", "data-l1-events" and "urlencoded-form" dissectors. Data must be passed from parent through dissectors data parameter.
Change-Id: I24ab56ce7d99f8ed670f4a50453223d4e6a46983 Reviewed-on: https://code.wireshark.org/review/5463 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-json.c')
-rw-r--r--epan/dissectors/packet-json.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/epan/dissectors/packet-json.c b/epan/dissectors/packet-json.c
index e858bcab54..7572232c7d 100644
--- a/epan/dissectors/packet-json.c
+++ b/epan/dissectors/packet-json.c
@@ -129,13 +129,7 @@ dissect_json(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
/*
* No information from dissector data
*/
- data_name = (char *)(pinfo->private_data);
- if (! (data_name && data_name[0])) {
- /*
- * No information from "private_data"
- */
- data_name = NULL;
- }
+ data_name = NULL;
}
}
@@ -164,15 +158,11 @@ dissect_json(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
/* if we have some unparsed data, pass to data-text-lines dissector (?) */
if (tvb_length_remaining(tvb, offset) > 0) {
- int datalen, reported_datalen;
tvbuff_t *next_tvb;
- datalen = tvb_length_remaining(tvb, offset);
- reported_datalen = tvb_reported_length_remaining(tvb, offset);
-
- next_tvb = tvb_new_subset(tvb, offset, datalen, reported_datalen);
+ next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(text_lines_handle, next_tvb, pinfo, tree);
+ call_dissector_with_data(text_lines_handle, next_tvb, pinfo, tree, data);
} else if (data_name) {
col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "(%s)", data_name);
}