emem -> wmem

svn path=/trunk/; revision=51993
This commit is contained in:
Jörg Mayer 2013-09-12 22:26:43 +00:00
parent c1e9555ad3
commit 2614ec5ea0
4 changed files with 22 additions and 22 deletions

View File

@ -31,7 +31,7 @@
#include "packet-tpkt.h"
#include <epan/conversation.h>
#include <epan/emem.h>
#include <epan/wmem/wmem.h>
void proto_register_x224(void);
void proto_reg_handoff_x224(void);
@ -227,7 +227,7 @@ dissect_x224(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *d
/* No. Attach that information to the conversation, and add
* it to the list of information structures.
*/
x224_info = se_new(x224_conv_info_t);
x224_info = wmem_new(wmem_file_scope(), x224_conv_info_t);
x224_info->klass=0;
conversation_add_proto_data(conversation, proto_x224, x224_info);

View File

@ -35,7 +35,7 @@
#include <epan/circuit.h>
#include <epan/reassemble.h>
#include <epan/prefs.h>
#include <epan/emem.h>
#include <epan/wmem/wmem.h>
#include <epan/expert.h>
#include <epan/nlpid.h>
#include <epan/x264_prt_id.h>
@ -602,7 +602,7 @@ static const char *clear_code(unsigned char code)
return "Destination Absent";
}
return ep_strdup_printf("Unknown %02X", code);
return wmem_strdup_printf(wmem_packet_scope(),"Unknown %02X", code);
}
static const char *reset_code(unsigned char code)
@ -630,7 +630,7 @@ static const char *reset_code(unsigned char code)
return "Network out of order";
}
return ep_strdup_printf("Unknown %02X", code);
return wmem_strdup_printf(wmem_packet_scope(),"Unknown %02X", code);
}
static const char *restart_code(unsigned char code)
@ -650,14 +650,14 @@ static const char *restart_code(unsigned char code)
return "Registration/cancellation confirmed";
}
return ep_strdup_printf("Unknown %02X", code);
return wmem_strdup_printf(wmem_packet_scope(),"Unknown %02X", code);
}
static char *
dte_address_util(tvbuff_t *tvb, int offset, guint8 len)
{
int i;
char *tmpbuf = (char *)ep_alloc(258);
char *tmpbuf = (char *)wmem_alloc(wmem_packet_scope(), 258);
for (i = 0; (i<len)&&(i<256); i++) {
if (i % 2 == 0) {
@ -1020,8 +1020,8 @@ x25_ntoa(proto_tree *tree, int *offset, tvbuff_t *tvb,
guint8 byte;
int localoffset;
addr1=(char *)ep_alloc(16);
addr2=(char *)ep_alloc(16);
addr1=(char *)wmem_alloc(wmem_packet_scope(), 16);
addr2=(char *)wmem_alloc(wmem_packet_scope(), 16);
byte = tvb_get_guint8(tvb, *offset);
len1 = (byte >> 0) & 0x0F;
@ -1101,8 +1101,8 @@ x25_toa(proto_tree *tree, int *offset, tvbuff_t *tvb,
guint8 byte;
int localoffset;
addr1=(char *)ep_alloc(256);
addr2=(char *)ep_alloc(256);
addr1=(char *)wmem_alloc(wmem_packet_scope(), 256);
addr2=(char *)wmem_alloc(wmem_packet_scope(), 256);
len1 = tvb_get_guint8(tvb, *offset);
if (tree) {

View File

@ -41,7 +41,6 @@
#include <wsutil/str_util.h>
#include <wsutil/report_err.h>
#include <epan/emem.h>
#include <epan/wmem/wmem.h>
#include <epan/packet.h>
#include <epan/tvbparse.h>
@ -191,7 +190,7 @@ dissect_xml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
g_ptr_array_free(stack, TRUE);
stack = g_ptr_array_new();
current_frame = (xml_frame_t *)ep_alloc(sizeof(xml_frame_t));
current_frame = (xml_frame_t *)wmem_alloc(wmem_packet_scope(), sizeof(xml_frame_t));
current_frame->type = XML_FRAME_ROOT;
current_frame->name = NULL;
current_frame->name_orig_case = NULL;
@ -212,7 +211,7 @@ dissect_xml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
colinfo_str = "/XML";
} else {
char *colinfo_str_buf;
colinfo_str_buf = ep_strdup_printf("/%s", root_ns->name);
colinfo_str_buf = wmem_strdup_printf(wmem_packet_scope(), "/%s", root_ns->name);
ascii_strup_inplace(colinfo_str_buf);
colinfo_str = colinfo_str_buf;
}
@ -326,7 +325,7 @@ static void after_token(void *tvbparse_data, const void *wanted_data _U_, tvbpar
tvb_format_text(tok->tvb, tok->offset, tok->len));
if (is_cdata) {
new_frame = (xml_frame_t *)ep_alloc(sizeof(xml_frame_t));
new_frame = (xml_frame_t *)wmem_alloc(wmem_packet_scope(), sizeof(xml_frame_t));
new_frame->type = XML_FRAME_CDATA;
new_frame->name = NULL;
new_frame->name_orig_case = NULL;
@ -369,7 +368,7 @@ static void before_xmpli(void *tvbparse_data, const void *wanted_data _U_, tvbpa
pt = proto_item_add_subtree(pi, ett);
new_frame = (xml_frame_t *)ep_alloc(sizeof(xml_frame_t));
new_frame = (xml_frame_t *)wmem_alloc(wmem_packet_scope(), sizeof(xml_frame_t));
new_frame->type = XML_FRAME_XMPLI;
new_frame->name = name;
new_frame->name_orig_case = name;
@ -436,7 +435,7 @@ static void before_tag(void *tvbparse_data, const void *wanted_data _U_, tvbpars
} else {
name = tvb_get_ephemeral_string(name_tok->tvb, name_tok->offset, name_tok->len);
name_orig_case = ep_strdup(name);
name_orig_case = wmem_strdup(wmem_packet_scope(), name);
ascii_strdown_inplace(name);
if(current_frame->ns) {
@ -459,7 +458,7 @@ static void before_tag(void *tvbparse_data, const void *wanted_data _U_, tvbpars
pt = proto_item_add_subtree(pi, ns->ett);
new_frame = (xml_frame_t *)ep_alloc(sizeof(xml_frame_t));
new_frame = (xml_frame_t *)wmem_alloc(wmem_packet_scope(), sizeof(xml_frame_t));
new_frame->type = XML_FRAME_TAG;
new_frame->name = name;
new_frame->name_orig_case = name_orig_case;
@ -527,7 +526,7 @@ static void before_dtd_doctype(void *tvbparse_data, const void *wanted_data _U_,
proto_item_set_text(dtd_item, "%s", tvb_format_text(tok->tvb, tok->offset, tok->len));
new_frame = (xml_frame_t *)ep_alloc(sizeof(xml_frame_t));
new_frame = (xml_frame_t *)wmem_alloc(wmem_packet_scope(), sizeof(xml_frame_t));
new_frame->type = XML_FRAME_DTD_DOCTYPE;
new_frame->name = (gchar *)tvb_get_ephemeral_string(name_tok->tvb,
name_tok->offset,
@ -589,7 +588,7 @@ static void after_attrib(void *tvbparse_data, const void *wanted_data _U_, tvbpa
xml_frame_t *new_frame;
name = tvb_get_ephemeral_string(tok->sub->tvb, tok->sub->offset, tok->sub->len);
name_orig_case = ep_strdup(name);
name_orig_case = wmem_strdup(wmem_packet_scope(), name);
ascii_strdown_inplace(name);
if(current_frame->ns && (hfidp = (int *)g_hash_table_lookup(current_frame->ns->attributes, name) )) {
@ -605,7 +604,7 @@ static void after_attrib(void *tvbparse_data, const void *wanted_data _U_, tvbpa
current_frame->last_item = pi;
new_frame = (xml_frame_t *)ep_alloc(sizeof(xml_frame_t));
new_frame = (xml_frame_t *)wmem_alloc(wmem_packet_scope(), sizeof(xml_frame_t));
new_frame->type = XML_FRAME_ATTRIB;
new_frame->name = name;
new_frame->name_orig_case = name_orig_case;

View File

@ -33,6 +33,7 @@
#include <epan/expert.h>
#include <epan/ipproto.h>
#include <epan/in_cksum.h>
#include <epan/wmem/wmem.h>
#define XTP_VERSION_4 0x001
@ -954,7 +955,7 @@ dissect_xtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
xtph->seq += tvb_get_ntohl(tvb, offset+4);
#define MAX_OPTIONS_LEN 128
options=(gchar *)ep_alloc(MAX_OPTIONS_LEN);
options=(gchar *)wmem_alloc(wmem_packet_scope(), MAX_OPTIONS_LEN);
options[0]=0;
cmd_options = xtph->cmd_options >> 8;
for (i = 0; i < 16; i++) {