summaryrefslogtreecommitdiff
path: root/wiretap/daintree-sna.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-06-17 21:18:47 +0000
committerGuy Harris <guy@alum.mit.edu>2013-06-17 21:18:47 +0000
commit32b95570df10da14e9662ac91974e89156221e10 (patch)
treed2de0f4835972269368035a2da153ed500a61444 /wiretap/daintree-sna.c
parent20de5f1a9a7d245887fa0e95bd9ef3dfbb8166bc (diff)
downloadwireshark-32b95570df10da14e9662ac91974e89156221e10.tar.gz
Merge "read record header" and "read packet data" routines into a single
routine, used both by read and seek-read routines. svn path=/trunk/; revision=49988
Diffstat (limited to 'wiretap/daintree-sna.c')
-rw-r--r--wiretap/daintree-sna.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/wiretap/daintree-sna.c b/wiretap/daintree-sna.c
index c44e99a9bb..7cc5bfa841 100644
--- a/wiretap/daintree-sna.c
+++ b/wiretap/daintree-sna.c
@@ -168,7 +168,7 @@ daintree_sna_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset)
* Wireshark opens the capture file for random access when displaying user-selected packets */
static gboolean
daintree_sna_seek_read(wtap *wth, gint64 seek_off, struct wtap_pkthdr *phdr,
- Buffer *buf, int len, int *err, gchar **err_info)
+ Buffer *buf, int len _U_, int *err, gchar **err_info)
{
char readLine[DAINTREE_MAX_LINE_SIZE];
char readData[READDATA_BUF_SIZE];
@@ -190,14 +190,8 @@ daintree_sna_seek_read(wtap *wth, gint64 seek_off, struct wtap_pkthdr *phdr,
return FALSE;
/* process packet data */
- if (!daintree_sna_process_hex_data(phdr, buf, readData, err, err_info))
- return FALSE;
- if (phdr->caplen != (guint32)len) {
- *err = WTAP_ERR_BAD_FILE;
- *err_info = g_strdup("daintree-sna: corrupted frame");
- return FALSE;
- }
- return TRUE;
+ return daintree_sna_process_hex_data(phdr, buf, readData, err,
+ err_info);
}
/* Scan a header line and fill in a struct wtap_pkthdr */