aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tpncp.c
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2013-09-12 16:15:54 +0000
committerJörg Mayer <jmayer@loplof.de>2013-09-12 16:15:54 +0000
commitd1ee499bc7680d057ee4c638c0881c583a875007 (patch)
tree6a6dca5a32a04357e4f16a86cce62565f3336abd /epan/dissectors/packet-tpncp.c
parent95ae33c8a07a4aeceec43ac851412a580984f0c5 (diff)
emem -> wmem
svn path=/trunk/; revision=51972
Diffstat (limited to 'epan/dissectors/packet-tpncp.c')
-rw-r--r--epan/dissectors/packet-tpncp.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/epan/dissectors/packet-tpncp.c b/epan/dissectors/packet-tpncp.c
index 9248cf285e..6fca753f58 100644
--- a/epan/dissectors/packet-tpncp.c
+++ b/epan/dissectors/packet-tpncp.c
@@ -39,7 +39,7 @@
#include <epan/exceptions.h>
#include <epan/packet.h>
#include <epan/prefs.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/filesystem.h>
#include <epan/dissectors/packet-tcp.h>
#include <epan/strutil.h>
@@ -295,7 +295,7 @@ static void dissect_tpncp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
proto_tree_add_int(tpncp_tree, hf_tpncp_cid, tvb, 12, 4, cid);
offset += 16;
if (tpncp_events_info_db[id].tpncp_data_field_size) {
- tpncp_header = ep_strdup_printf("TPNCP Event: %s (%d)", val_to_str_const(id, tpncp_events_id_vals, "Unknown"), id);
+ tpncp_header = wmem_strdup_printf(wmem_packet_scope(), "TPNCP Event: %s (%d)", val_to_str_const(id, tpncp_events_id_vals, "Unknown"), id);
tpncp_item = proto_tree_add_text(tree, tvb, offset, -1, "%s", tpncp_header);
dissect_tpncp_event(id, tvb, tpncp_item, &offset);
}
@@ -306,7 +306,7 @@ static void dissect_tpncp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
proto_tree_add_uint(tpncp_tree, hf_tpncp_command_id, tvb, 8, 4, id);
offset += 12;
if (tpncp_commands_info_db[id].tpncp_data_field_size) {
- tpncp_header = ep_strdup_printf("TPNCP Command: %s (%d)", val_to_str_const(id, tpncp_commands_id_vals, "Unknown"), id);
+ tpncp_header = wmem_strdup_printf(wmem_packet_scope(), "TPNCP Command: %s (%d)", val_to_str_const(id, tpncp_commands_id_vals, "Unknown"), id);
tpncp_item = proto_tree_add_text(tree, tvb, offset, -1, "%s", tpncp_header);
dissect_tpncp_command(id, tvb, tpncp_item, &offset);
}
@@ -345,9 +345,9 @@ static gint fill_tpncp_id_vals(value_string string[], FILE *file) {
gint i = 0, tpncp_id = 0;
gchar *tpncp_name = NULL, *line_in_file = NULL;
- line_in_file = (gchar *)ep_alloc(MAX_TPNCP_DB_ENTRY_LEN);
+ line_in_file = (gchar *)wmem_alloc(wmem_packet_scope(), MAX_TPNCP_DB_ENTRY_LEN);
line_in_file[0] = 0;
- tpncp_name = (gchar *)ep_alloc(MAX_TPNCP_DB_ENTRY_LEN);
+ tpncp_name = (gchar *)wmem_alloc(wmem_packet_scope(), MAX_TPNCP_DB_ENTRY_LEN);
tpncp_name[0] = 0;
while (fgets(line_in_file, MAX_TPNCP_DB_ENTRY_LEN, file) != NULL) {
@@ -377,13 +377,13 @@ static gint fill_enums_id_vals(FILE *file) {
gchar *line_in_file = NULL, *enum_name = NULL,
*enum_type = NULL, *enum_str = NULL;
- line_in_file = (gchar *)ep_alloc(MAX_TPNCP_DB_ENTRY_LEN);
+ line_in_file = (gchar *)wmem_alloc(wmem_packet_scope(), MAX_TPNCP_DB_ENTRY_LEN);
line_in_file[0] = 0;
- enum_name = (gchar *)ep_alloc(MAX_TPNCP_DB_ENTRY_LEN);
+ enum_name = (gchar *)wmem_alloc(wmem_packet_scope(), MAX_TPNCP_DB_ENTRY_LEN);
enum_name[0] = 0;
- enum_type = (gchar *)ep_alloc(MAX_TPNCP_DB_ENTRY_LEN);
+ enum_type = (gchar *)wmem_alloc(wmem_packet_scope(), MAX_TPNCP_DB_ENTRY_LEN);
enum_type[0] = 0;
- enum_str = (gchar *)ep_alloc(MAX_TPNCP_DB_ENTRY_LEN);
+ enum_str = (gchar *)wmem_alloc(wmem_packet_scope(), MAX_TPNCP_DB_ENTRY_LEN);
enum_str[0] = 0;
while (fgets(line_in_file, MAX_TPNCP_DB_ENTRY_LEN, file) != NULL) {
@@ -572,7 +572,7 @@ static gint init_tpncp_data_fields_info(tpncp_data_field_info *data_fields_info,
}
};
- tpncp_db_entry = (gchar *)ep_alloc(MAX_TPNCP_DB_ENTRY_LEN);
+ tpncp_db_entry = (gchar *)wmem_alloc(wmem_packet_scope(), MAX_TPNCP_DB_ENTRY_LEN);
tpncp_db_entry[0] = 0;
/* Register common fields of hf_register_info struture. */
@@ -700,7 +700,7 @@ static gint init_tpncp_db(void) {
gchar *tpncp_dat_file_path;
FILE *file;
- tpncp_dat_file_path = ep_strdup_printf("%s" G_DIR_SEPARATOR_S"tpncp" G_DIR_SEPARATOR_S "tpncp.dat", get_datafile_dir());
+ tpncp_dat_file_path = wmem_strdup_printf(wmem_packet_scope(), "%s" G_DIR_SEPARATOR_S"tpncp" G_DIR_SEPARATOR_S "tpncp.dat", get_datafile_dir());
/* Open file with TPNCP data. */
if ((file = ws_fopen(tpncp_dat_file_path, "r")) == NULL)