From a600ef6d5993ab8cab79e11e3e6a1218260e44c2 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Sat, 22 Nov 2014 18:17:20 -0500 Subject: Have media dissector take its "media type parameter" from dissector data parameter instead of pinfo->private_data. Change-Id: I0a0cb0b4838bc4e55a759fb6031355892c220c8e Reviewed-on: https://code.wireshark.org/review/5461 Reviewed-by: Michael Mann Petri-Dish: Michael Mann Reviewed-by: Anders Broman --- epan/dissectors/packet-wsp.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'epan/dissectors/packet-wsp.c') diff --git a/epan/dissectors/packet-wsp.c b/epan/dissectors/packet-wsp.c index b624866871..bdcb838ee2 100644 --- a/epan/dissectors/packet-wsp.c +++ b/epan/dissectors/packet-wsp.c @@ -5035,12 +5035,9 @@ dissect_wsp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, if (! found_match) { if (! dissector_try_heuristic(heur_subdissector_list, tmp_tvb, pinfo, tree, &hdtbl_entry, NULL)) { - guint8* save_private_data = (guint8 *)pinfo->private_data; pinfo->match_string = contentTypeStr; - pinfo->private_data = NULL; /* TODO: parameters */ - call_dissector(media_handle, tmp_tvb, pinfo, tree); - pinfo->private_data = save_private_data; + call_dissector_with_data(media_handle, tmp_tvb, pinfo, tree, NULL /* TODO: parameters */); #if 0 if (tree) /* Only display if needed */ add_post_data (wsp_tree, tmp_tvb, @@ -5128,12 +5125,9 @@ dissect_wsp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, if (! found_match) { if (! dissector_try_heuristic(heur_subdissector_list, tmp_tvb, pinfo, tree, &hdtbl_entry, NULL)) { - guint8* save_private_data = (guint8 *)pinfo->private_data; pinfo->match_string = contentTypeStr; - pinfo->private_data = NULL; /* TODO: parameters */ - call_dissector(media_handle, tmp_tvb, pinfo, tree); - pinfo->private_data = save_private_data; + call_dissector_with_data(media_handle, tmp_tvb, pinfo, tree, NULL /* TODO: parameters */); #if 0 if (tree) / * Only display if needed * / proto_tree_add_item (wsp_tree, @@ -5212,12 +5206,9 @@ dissect_wsp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, if (! found_match) { if (! dissector_try_heuristic(heur_subdissector_list, tmp_tvb, pinfo, tree, &hdtbl_entry, NULL)) { - guint8* save_private_data = (guint8 *)pinfo->private_data; pinfo->match_string = contentTypeStr; - pinfo->private_data = NULL; /* TODO: parameters */ - call_dissector(media_handle, tmp_tvb, pinfo, tree); - pinfo->private_data = save_private_data; + call_dissector_with_data(media_handle, tmp_tvb, pinfo, tree, NULL /* TODO: parameters */); #if 0 if (tree) /* Only display if needed */ proto_tree_add_item (wsp_tree, @@ -5809,12 +5800,9 @@ add_multipart_data (proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo) if (! found_match) { if (! dissector_try_heuristic(heur_subdissector_list, tmp_tvb, pinfo, mpart_tree, &hdtbl_entry, NULL)) { - guint8* save_private_data = (guint8 *)pinfo->private_data; pinfo->match_string = contentTypeStr; - pinfo->private_data = NULL; /* TODO: parameters */ - call_dissector(media_handle, tmp_tvb, pinfo, mpart_tree); - pinfo->private_data = save_private_data; + call_dissector_with_data(media_handle, tmp_tvb, pinfo, mpart_tree, NULL /* TODO: parameters */); #if 0 if (tree) /* Only display if needed */ proto_tree_add_item (mpart_tree, hf_wsp_multipart_data, -- cgit v1.2.3