aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tpncp.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-09-12 17:32:49 +0000
committerEvan Huus <eapache@gmail.com>2013-09-12 17:32:49 +0000
commit1f3adeae8ca104665d456496a2ea9cf2220de307 (patch)
tree6af47dfeedc450bf1c51bcef9de9855f12a09041 /epan/dissectors/packet-tpncp.c
parent3d5ed04f60892f6cbe1d188a6a247f38b1928ec3 (diff)
Revert the TPNCP changes in r51972 until we can figure out a better way to fix
it. svn path=/trunk/; revision=51976
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 6fca753f58..9248cf285e 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/wmem/wmem.h>
+#include <epan/emem.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 = wmem_strdup_printf(wmem_packet_scope(), "TPNCP Event: %s (%d)", val_to_str_const(id, tpncp_events_id_vals, "Unknown"), id);
+ tpncp_header = ep_strdup_printf("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 = wmem_strdup_printf(wmem_packet_scope(), "TPNCP Command: %s (%d)", val_to_str_const(id, tpncp_commands_id_vals, "Unknown"), id);
+ tpncp_header = ep_strdup_printf("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 *)wmem_alloc(wmem_packet_scope(), MAX_TPNCP_DB_ENTRY_LEN);
+ line_in_file = (gchar *)ep_alloc(MAX_TPNCP_DB_ENTRY_LEN);
line_in_file[0] = 0;
- tpncp_name = (gchar *)wmem_alloc(wmem_packet_scope(), MAX_TPNCP_DB_ENTRY_LEN);
+ tpncp_name = (gchar *)ep_alloc(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 *)wmem_alloc(wmem_packet_scope(), MAX_TPNCP_DB_ENTRY_LEN);
+ line_in_file = (gchar *)ep_alloc(MAX_TPNCP_DB_ENTRY_LEN);
line_in_file[0] = 0;
- enum_name = (gchar *)wmem_alloc(wmem_packet_scope(), MAX_TPNCP_DB_ENTRY_LEN);
+ enum_name = (gchar *)ep_alloc(MAX_TPNCP_DB_ENTRY_LEN);
enum_name[0] = 0;
- enum_type = (gchar *)wmem_alloc(wmem_packet_scope(), MAX_TPNCP_DB_ENTRY_LEN);
+ enum_type = (gchar *)ep_alloc(MAX_TPNCP_DB_ENTRY_LEN);
enum_type[0] = 0;
- enum_str = (gchar *)wmem_alloc(wmem_packet_scope(), MAX_TPNCP_DB_ENTRY_LEN);
+ enum_str = (gchar *)ep_alloc(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 *)wmem_alloc(wmem_packet_scope(), MAX_TPNCP_DB_ENTRY_LEN);
+ tpncp_db_entry = (gchar *)ep_alloc(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 = wmem_strdup_printf(wmem_packet_scope(), "%s" G_DIR_SEPARATOR_S"tpncp" G_DIR_SEPARATOR_S "tpncp.dat", get_datafile_dir());
+ tpncp_dat_file_path = ep_strdup_printf("%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)