aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-fw1.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-fw1.c')
-rw-r--r--epan/dissectors/packet-fw1.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/epan/dissectors/packet-fw1.c b/epan/dissectors/packet-fw1.c
index 231ed1683a..e4ceb708fa 100644
--- a/epan/dissectors/packet-fw1.c
+++ b/epan/dissectors/packet-fw1.c
@@ -89,7 +89,7 @@
#include <glib.h>
#include <epan/packet.h>
#include <epan/prefs.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/etypes.h>
/* Place FW1 summary in proto tree */
@@ -132,12 +132,13 @@ dissect_fw1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
char *interface_name;
guint32 iface_len = 10;
guint16 etype;
- emem_strbuf_t *header;
+ wmem_strbuf_t *header;
int i;
gboolean found;
static const char fw1_header[] = "FW1 Monitor";
- header = ep_strbuf_new_label(fw1_header);
+ header = wmem_strbuf_new_label(wmem_epan_scope());
+ wmem_strbuf_append(header, fw1_header);
/* Make entries in Protocol column and Info column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FW1");
@@ -157,7 +158,7 @@ dissect_fw1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (fw1_with_uuid)
iface_len = 6;
- interface_name=(char *)ep_alloc(iface_len+1);
+ interface_name=(char *)wmem_alloc(wmem_packet_scope(), iface_len+1);
tvb_get_nstringz0(tvb, 2, iface_len+1, interface_name);
/* Known interface name - if not, remember it */
@@ -169,33 +170,33 @@ dissect_fw1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
}
if (!found && interface_anzahl < MAX_INTERFACES) {
- p_interfaces[interface_anzahl] = se_strdup(interface_name);
+ p_interfaces[interface_anzahl] = wmem_strdup(wmem_file_scope(), interface_name);
interface_anzahl++;
}
/* display all interfaces always in the same order */
for (i=0; i<interface_anzahl; i++) {
if ( strcmp(p_interfaces[i], interface_name) == 0 ) {
- ep_strbuf_append_printf(header, " %c%c %s %c%c",
- direction == 'i' ? 'i' : (direction == 'O' ? 'O' : ' '),
- (direction == 'i' || direction == 'O') ? chain : ' ',
- p_interfaces[i],
- direction == 'I' ? 'I' : (direction == 'o' ? 'o' : ' '),
- (direction == 'I' || direction == 'o') ? chain : ' '
+ wmem_strbuf_append_printf(header, " %c%c %s %c%c",
+ direction == 'i' ? 'i' : (direction == 'O' ? 'O' : ' '),
+ (direction == 'i' || direction == 'O') ? chain : ' ',
+ p_interfaces[i],
+ direction == 'I' ? 'I' : (direction == 'o' ? 'o' : ' '),
+ (direction == 'I' || direction == 'o') ? chain : ' '
);
} else {
- ep_strbuf_append_printf(header, " %s ", p_interfaces[i]);
+ wmem_strbuf_append_printf(header, " %s ", p_interfaces[i]);
}
}
- col_add_str(pinfo->cinfo, COL_IF_DIR, header->str + sizeof(fw1_header) + 1);
+ col_add_str(pinfo->cinfo, COL_IF_DIR, wmem_strbuf_get_str(header) + sizeof(fw1_header) + 1);
if (tree) {
if (!fw1_summary_in_tree)
/* Do not show the summary in Protocol Tree */
ti = proto_tree_add_protocol_format(tree, proto_fw1, tvb, 0, ETH_HEADER_SIZE, "%s", fw1_header);
else
- ti = proto_tree_add_protocol_format(tree, proto_fw1, tvb, 0, ETH_HEADER_SIZE, "%s", header->str);
+ ti = proto_tree_add_protocol_format(tree, proto_fw1, tvb, 0, ETH_HEADER_SIZE, "%s", wmem_strbuf_get_str(header));
/* create display subtree for the protocol */
fh_tree = proto_item_add_subtree(ti, ett_fw1);