aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2008-08-03 15:44:26 +0000
committerAnders Broman <anders.broman@ericsson.com>2008-08-03 15:44:26 +0000
commit86e0bde995d813803dd41ec6ba5f3911c29d8015 (patch)
treede8a8abdf1eded4d81a11c9b970452f123ccf812
parent2b9d63a4b5ba6b10f596339a317ca36a8d66c460 (diff)
packet-multipart.c:179: warning: unused parameter 'pinfo'
packet-multipart.c:179: warning: unused parameter 'name' ( restore a bit of previous code) Move inclusion of tvbuff.h to base64.c svn path=/trunk/; revision=25909
-rw-r--r--epan/base64.c1
-rw-r--r--epan/base64.h1
-rw-r--r--epan/dissectors/packet-multipart.c6
3 files changed, 5 insertions, 3 deletions
diff --git a/epan/base64.c b/epan/base64.c
index 7a5966d843..be9fe3a26f 100644
--- a/epan/base64.c
+++ b/epan/base64.c
@@ -27,6 +27,7 @@
#endif
#include <string.h>
+#include "epan/tvbuff.h"
#include "base64.h"
/* Decode a base64 string in-place - simple and slow algorithm.
diff --git a/epan/base64.h b/epan/base64.h
index ffef8ebf17..0a1b94709e 100644
--- a/epan/base64.h
+++ b/epan/base64.h
@@ -28,7 +28,6 @@
extern "C" {
#endif /* __cplusplus */
-#include "epan/tvbuff.h"
/* In-place decoding of a base64 string. */
size_t epan_base64_decode(char *s);
diff --git a/epan/dissectors/packet-multipart.c b/epan/dissectors/packet-multipart.c
index 7707deacd2..d15a27eb22 100644
--- a/epan/dissectors/packet-multipart.c
+++ b/epan/dissectors/packet-multipart.c
@@ -179,11 +179,13 @@ static tvbuff_t *
base64_decode(packet_info *pinfo, tvbuff_t *b64_tvb, char *name)
{
char *data;
-
+ tvbuff_t *tvb;
data = g_strdup(tvb_get_ephemeral_string(b64_tvb, 0, tvb_length(b64_tvb)));
+ tvb = base64_to_tvb(data);
+ add_new_data_source(pinfo, tvb, name);
- return base64_to_tvb(data);
+ return tvb;
}
/*