diff options
author | Evan Huus <eapache@gmail.com> | 2012-07-22 21:48:51 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2012-07-22 21:48:51 +0000 |
commit | daa0ff3ac80126abf74110a8fdb13a38369ba089 (patch) | |
tree | 341399cfadefcbf2ec3ee44947bcd3f5ee99e71b /epan/dissectors/packet-xmpp-core.h | |
parent | 5c75ecd4245289be43cdbdae7edd9952a44918d8 (diff) |
The XMPP dissector was allocating a new parser for every packet and never
freeing them. This was slow and leaked gobs of memory.
Be like XML: allocate one parser during set-up and share it around.
svn path=/trunk/; revision=43920
Diffstat (limited to 'epan/dissectors/packet-xmpp-core.h')
-rw-r--r-- | epan/dissectors/packet-xmpp-core.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/epan/dissectors/packet-xmpp-core.h b/epan/dissectors/packet-xmpp-core.h index f79aa27af4..221d4ab2e3 100644 --- a/epan/dissectors/packet-xmpp-core.h +++ b/epan/dissectors/packet-xmpp-core.h @@ -26,8 +26,15 @@ #ifndef XMPP_CORE_H #define XMPP_CORE_H +#include "epan/tvbparse.h" + #include "packet-xmpp-utils.h" +extern void xmpp_init_parsers(void); +extern tvbparse_wanted_t *want_ignore; +extern tvbparse_wanted_t *want_stream_end_tag; +extern tvbparse_wanted_t *want_stream_end_with_ns; + extern void xmpp_iq(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t *packet); extern void xmpp_presence(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t *packet); extern void xmpp_message(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t *packet); |