aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/lanalyzer.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-03-10 06:33:58 +0000
committerGuy Harris <guy@alum.mit.edu>2001-03-10 06:33:58 +0000
commita251addb63587c5e064bcc58422c0951c4dc4c97 (patch)
treec5e776c62f153404ad4617c940bafc4c4fb4d74f /wiretap/lanalyzer.c
parent9b1133892b4a545eb142ce4529a53de353f41410 (diff)
downloadwireshark-a251addb63587c5e064bcc58422c0951c4dc4c97.tar.gz
wireshark-a251addb63587c5e064bcc58422c0951c4dc4c97.tar.bz2
wireshark-a251addb63587c5e064bcc58422c0951c4dc4c97.zip
Obliging every capture file reader's "open()" routine to seek to the
beginning of the file before reading anything from the file is bogus - do that in the loop that tries each of the open routines, instead. (They may have to reset the seek pointer later if, for example, the capture file begins with the first packet, and the "open()" routine looks at that packet to try to guess whether the packet is in the file format in question.) Set "wth->data_offset" to 0 while you're at it, so capture file readers don't have to do that, either. svn path=/trunk/; revision=3123
Diffstat (limited to 'wiretap/lanalyzer.c')
-rw-r--r--wiretap/lanalyzer.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/wiretap/lanalyzer.c b/wiretap/lanalyzer.c
index e566c71866..9ff11760b0 100644
--- a/wiretap/lanalyzer.c
+++ b/wiretap/lanalyzer.c
@@ -1,6 +1,6 @@
/* lanalyzer.c
*
- * $Id: lanalyzer.c,v 1.26 2000/09/21 04:41:30 gram Exp $
+ * $Id: lanalyzer.c,v 1.27 2001/03/10 06:33:57 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
@@ -61,8 +61,6 @@ int lanalyzer_open(wtap *wth, int *err)
guint8 cr_day, cr_month, cr_year;
struct tm tm;
- file_seek(wth->fh, 0, SEEK_SET);
- wth->data_offset = 0;
errno = WTAP_ERR_CANT_READ;
bytes_read = file_read(LE_record_type, 1, 2, wth->fh);
bytes_read += file_read(LE_record_length, 1, 2, wth->fh);