aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-09-12 12:25:17 +0000
committerEvan Huus <eapache@gmail.com>2013-09-12 12:25:17 +0000
commit343772cbcf9ced336d40a6ad1886c93199ed9775 (patch)
tree800e4b86fde79cc1f1423268913cb3b89dfb45f1
parent2d128b70bdb90dfc55f5cf41357b90ec75056549 (diff)
Convert a few more dissectors to wmem.
svn path=/trunk/; revision=51967
-rw-r--r--epan/dissectors/packet-afp.c6
-rw-r--r--epan/dissectors/packet-afs.c12
-rw-r--r--epan/dissectors/packet-ajp13.c12
-rw-r--r--epan/dissectors/packet-beep.c10
4 files changed, 20 insertions, 20 deletions
diff --git a/epan/dissectors/packet-afp.c b/epan/dissectors/packet-afp.c
index 610933101c..03c723b081 100644
--- a/epan/dissectors/packet-afp.c
+++ b/epan/dissectors/packet-afp.c
@@ -34,7 +34,7 @@
#include <epan/packet.h>
/* #include <epan/strutil.h> */
#include <epan/conversation.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/tap.h>
#include <epan/expert.h>
@@ -4842,10 +4842,10 @@ dissect_afp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (!request_val && !aspinfo->reply) {
afp_command = tvb_get_guint8(tvb, offset);
- new_request_key = se_new(afp_request_key);
+ new_request_key = wmem_new(wmem_file_scope(), afp_request_key);
*new_request_key = request_key;
- request_val = se_new(afp_request_val);
+ request_val = wmem_new(wmem_file_scope(), afp_request_val);
request_val->command = afp_command;
if (afp_command == AFP_SPOTLIGHTRPC)
diff --git a/epan/dissectors/packet-afs.c b/epan/dissectors/packet-afs.c
index e36836e60d..745f24e293 100644
--- a/epan/dissectors/packet-afs.c
+++ b/epan/dissectors/packet-afs.c
@@ -41,7 +41,7 @@
#include <epan/packet.h>
#include <epan/conversation.h>
#include <epan/addr_resolv.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/strutil.h>
#include "packet-rx.h"
@@ -1585,10 +1585,10 @@ dissect_afs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
opcode = 0;
if(!pinfo->fd->flags.visited){
if ( !request_val && !reply) {
- new_request_key = se_new(struct afs_request_key);
+ new_request_key = wmem_new(wmem_file_scope(), struct afs_request_key);
*new_request_key = request_key;
- request_val = se_new(struct afs_request_val);
+ request_val = wmem_new(wmem_file_scope(), struct afs_request_val);
request_val -> opcode = tvb_get_ntohl(tvb, offset);
request_val -> req_num = pinfo->fd->num;
request_val -> rep_num = 0;
@@ -2747,7 +2747,7 @@ dissect_vldb_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o
{
char *part;
j = tvb_get_ntohl(tvb, offset);
- part=ep_strdup("/vicepa");
+ part=wmem_strdup(wmem_packet_scope(), "/vicepa");
if ( i<nservers && j<=25 )
{
part[6] = 'a' + (char) j;
@@ -2794,7 +2794,7 @@ dissect_vldb_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o
{
char *part;
j = tvb_get_ntohl(tvb, offset);
- part=ep_strdup("/vicepa");
+ part=wmem_strdup(wmem_packet_scope(), "/vicepa");
if ( i<nservers && j<=25 )
{
part[6] = 'a' + (char) j;
@@ -2842,7 +2842,7 @@ dissect_vldb_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o
{
char *part;
j = tvb_get_ntohl(tvb, offset);
- part=ep_strdup("/vicepa");
+ part=wmem_strdup(wmem_packet_scope(), "/vicepa");
if ( i<nservers && j<=25 )
{
part[6] = 'a' + (char) j;
diff --git a/epan/dissectors/packet-ajp13.c b/epan/dissectors/packet-ajp13.c
index 9bc7b8f226..f7ac4fdb69 100644
--- a/epan/dissectors/packet-ajp13.c
+++ b/epan/dissectors/packet-ajp13.c
@@ -30,7 +30,7 @@
#include <glib.h>
#include <epan/packet.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/conversation.h>
#include "packet-tcp.h"
@@ -440,7 +440,7 @@ display_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ajp13_tree, ajp13_con
if (ajp13_tree) {
proto_tree_add_string_format(ajp13_tree, hf_ajp13_additional_header,
tvb, hpos, hname_len+2+hval_len+2,
- ep_strdup_printf("%s: %s", hname, hval),
+ wmem_strdup_printf(wmem_packet_scope(), "%s: %s", hname, hval),
"%s: %s", hname, hval);
}
pos+=hval_len+2;
@@ -689,7 +689,7 @@ display_req_forward(tvbuff_t *tvb, packet_info *pinfo,
if (ajp13_tree) {
proto_tree_add_string_format(ajp13_tree, hf_ajp13_additional_header,
tvb, hpos, hname_len+2+hval_len+2,
- ep_strdup_printf("%s: %s", hname, hval),
+ wmem_strdup_printf(wmem_packet_scope(), "%s: %s", hname, hval),
"%s: %s", hname, hval);
}
pos+=hval_len+2;
@@ -733,7 +733,7 @@ display_req_forward(tvbuff_t *tvb, packet_info *pinfo,
if (ajp13_tree) {
proto_tree_add_string_format(ajp13_tree, hf_ajp13_req_attribute,
tvb, apos, 1+aname_len+2+aval_len+2,
- ep_strdup_printf("%s: %s", aname, aval),
+ wmem_strdup_printf(wmem_packet_scope(), "%s: %s", aname, aval),
"%s: %s", aname, aval);
}
} else if (aid == 0x0B ) {
@@ -783,7 +783,7 @@ dissect_ajp13_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
cd = (ajp13_conv_data*)conversation_get_proto_data(conv, proto_ajp13);
if (!cd) {
- cd = se_new(ajp13_conv_data);
+ cd = wmem_new(wmem_file_scope(), ajp13_conv_data);
cd->content_length = 0;
cd->was_get_body_chunk = FALSE;
conversation_add_proto_data(conv, proto_ajp13, cd);
@@ -800,7 +800,7 @@ dissect_ajp13_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* time we've see the packet, and it must be the first "in order"
* pass through the data.
*/
- fd = se_new(ajp13_frame_data);
+ fd = wmem_new(wmem_file_scope(), ajp13_frame_data);
p_add_proto_data(pinfo->fd, proto_ajp13, 0, fd);
fd->is_request_body = FALSE;
if (cd->content_length) {
diff --git a/epan/dissectors/packet-beep.c b/epan/dissectors/packet-beep.c
index c9ce582dec..ded418df1e 100644
--- a/epan/dissectors/packet-beep.c
+++ b/epan/dissectors/packet-beep.c
@@ -37,7 +37,7 @@
#include <epan/addr_resolv.h>
#include <epan/prefs.h>
#include <epan/conversation.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/expert.h>
#define TCP_PORT_BEEP 10288
@@ -795,10 +795,10 @@ dissect_beep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (!request_val) { /* Create one */
- new_request_key = (struct beep_request_key *)se_alloc(sizeof(struct beep_request_key));
+ new_request_key = wmem_new(wmem_file_scope(), struct beep_request_key);
new_request_key->conversation = conversation->index;
- request_val = (struct beep_request_val *)se_alloc(sizeof(struct beep_request_val));
+ request_val = wmem_new(wmem_file_scope(), struct beep_request_val);
request_val->processed = 0;
request_val->size = 0;
@@ -868,7 +868,7 @@ dissect_beep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* elsewhere for other frames
*/
- beep_frame_data = se_new(struct beep_proto_data);
+ beep_frame_data = wmem_new(wmem_file_scope(), struct beep_proto_data);
beep_frame_data->pl_left = pl_left;
beep_frame_data->pl_size = 0;
@@ -884,7 +884,7 @@ dissect_beep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (beep_frame_data == NULL) {
- beep_frame_data = (struct beep_proto_data *)se_alloc(sizeof(struct beep_proto_data));
+ beep_frame_data = wmem_new(wmem_file_scope(), struct beep_proto_data);
beep_frame_data->pl_left = 0;
beep_frame_data->pl_size = 0;