aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-xml.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2014-11-26 23:01:48 +0100
committerMichael Mann <mmann78@netscape.net>2014-11-26 23:12:08 +0000
commitcc893abb25cc568d17ae1afcb4822f521d1f9e30 (patch)
treecf0dea1c9b29d58563f6162b27b0cba9ca0faa6b /epan/dissectors/packet-xml.c
parentc2913d25a92dfc3e3c5c0020338018f895ff2b23 (diff)
XML: pass XML structure to caller through p_(add|get)_proto_data functions
Since ge3a04bb data parameter is used for the media-type string Bug: 10729 Change-Id: I3df640079a8bf57f4bd86a1baa08cbf9a3a7e1b3 Reviewed-on: https://code.wireshark.org/review/5511 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-xml.c')
-rw-r--r--epan/dissectors/packet-xml.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/dissectors/packet-xml.c b/epan/dissectors/packet-xml.c
index d32494028c..77d8f01bcf 100644
--- a/epan/dissectors/packet-xml.c
+++ b/epan/dissectors/packet-xml.c
@@ -183,12 +183,11 @@ static void insert_xml_frame(xml_frame_t *parent, xml_frame_t *new_child)
}
static int
-dissect_xml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
+dissect_xml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
tvbparse_t *tt;
static GPtrArray *stack;
xml_frame_t *current_frame;
- xml_frame_t **ret_frame = (xml_frame_t**)data;
const char *colinfo_str;
if (stack != NULL)
@@ -231,8 +230,8 @@ dissect_xml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
while(tvbparse_get(tt, want)) ;
- if (ret_frame != NULL)
- *ret_frame = current_frame; /* pass XML structure to the dissector calling XML */
+ /* Save XML structure in case it is useful for the caller (only XMPP for now) */
+ p_add_proto_data(pinfo->pool, pinfo, xml_ns.hf_tag, 0, current_frame);
return tvb_captured_length(tvb);
}