diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2013-09-15 18:03:32 +0000 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2013-09-15 18:03:32 +0000 |
commit | 20a40260d7b8d0353f82f389b17c6c27223d8d95 (patch) | |
tree | a7670a45def65438a559090921ceeda76d9a1a3e /epan/dissectors/packet-openwire.c | |
parent | a54e67abce764d954d915d62f9d30b675b5262ce (diff) |
A few more dissectors converted to wmem
svn path=/trunk/; revision=52071
Diffstat (limited to 'epan/dissectors/packet-openwire.c')
-rw-r--r-- | epan/dissectors/packet-openwire.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/epan/dissectors/packet-openwire.c b/epan/dissectors/packet-openwire.c index 55730fb195..c79693079f 100644 --- a/epan/dissectors/packet-openwire.c +++ b/epan/dissectors/packet-openwire.c @@ -47,6 +47,7 @@ #include <epan/conversation.h> #include <epan/prefs.h> #include <epan/expert.h> +#include <epan/wmem/wmem.h> #include "packet-tcp.h" static int proto_openwire = -1; @@ -603,7 +604,7 @@ detect_protocol_options(tvbuff_t *tvb, packet_info *pinfo, int offset, int iComm type = tvb_get_guint8(tvb, offset + 11); command_id = tvb_get_ntohl(tvb, offset + 5); - cd = se_new(openwire_conv_data); + cd = wmem_new(wmem_file_scope(), openwire_conv_data); cd->caching = FALSE; cd->tight = FALSE; if (command_id > (1 << 24)) @@ -639,7 +640,7 @@ detect_protocol_options(tvbuff_t *tvb, packet_info *pinfo, int offset, int iComm cd = (openwire_conv_data*)conversation_get_proto_data(conv, proto_openwire); if (!cd) { - cd = se_new(openwire_conv_data); + cd = wmem_new(wmem_file_scope(), openwire_conv_data); cd->tight = TRUE; cd->caching = FALSE; /* Dummy value */ conversation_add_proto_data(conv, proto_openwire, cd); @@ -680,7 +681,7 @@ dissect_openwire_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o { gint startOffset = offset; proto_item *boolean_item = NULL; - emem_strbuf_t *cache_strbuf = ep_strbuf_new_label(""); + wmem_strbuf_t *cache_strbuf = wmem_strbuf_new_label(wmem_packet_scope()); if (type == OPENWIRE_TYPE_CACHED && retrieve_caching(pinfo) == TRUE && tvb_length_remaining(tvb, offset) >= 3) { @@ -689,7 +690,7 @@ dissect_openwire_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o proto_item * cached_item = NULL; inlined = tvb_get_guint8(tvb, offset + 0) == TRUE ? TRUE : FALSE; cachedID = tvb_get_ntohs(tvb, offset + 1); - ep_strbuf_append_printf(cache_strbuf, " (CachedID: %d)", cachedID); + wmem_strbuf_append_printf(cache_strbuf, " (CachedID: %d)", cachedID); if (openwire_verbose_type) { proto_tree_add_item(tree, hf_openwire_cached_inlined, tvb, offset, 1, ENC_BIG_ENDIAN); @@ -704,7 +705,7 @@ dissect_openwire_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o { proto_item *ti; ti = proto_tree_add_item(tree, particularize(field, hf_openwire_type_object), tvb, startOffset, 3, ENC_NA); - proto_item_append_text(ti, "%s", cache_strbuf->str); + proto_item_append_text(ti, "%s", wmem_strbuf_get_str(cache_strbuf)); return 3; } else @@ -895,7 +896,7 @@ dissect_openwire_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o proto_item *ti; ti = proto_tree_add_item(tree, particularize(field, hf_openwire_type_object), tvb, startOffset, -1, ENC_NA); proto_item_append_text(ti, ": %s", val_to_str_ext(type, &openwire_type_vals_ext, "Unknown (0x%02x)")); - proto_item_append_text(ti, "%s", cache_strbuf->str); + proto_item_append_text(ti, "%s", wmem_strbuf_get_str(cache_strbuf)); object_tree = proto_item_add_subtree(ti, ett_openwire_type); |