diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-03-10 06:33:58 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-03-10 06:33:58 +0000 |
commit | a251addb63587c5e064bcc58422c0951c4dc4c97 (patch) | |
tree | c5e776c62f153404ad4617c940bafc4c4fb4d74f /wiretap/pppdump.c | |
parent | 9b1133892b4a545eb142ce4529a53de353f41410 (diff) | |
download | wireshark-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/pppdump.c')
-rw-r--r-- | wiretap/pppdump.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/wiretap/pppdump.c b/wiretap/pppdump.c index 340dfac914..1ed11e5ef4 100644 --- a/wiretap/pppdump.c +++ b/wiretap/pppdump.c @@ -1,6 +1,6 @@ /* pppdump.c * - * $Id: pppdump.c,v 1.7 2000/12/09 03:02:43 gram Exp $ + * $Id: pppdump.c,v 1.8 2001/03/10 06:33:58 guy Exp $ * * Copyright (c) 2000 by Gilbert Ramirez <gram@xiexie.org> * @@ -178,7 +178,6 @@ pppdump_open(wtap *wth, int *err) * representing the timestamp. */ - file_seek(wth->fh, 0, SEEK_SET); wtap_file_read_unknown_bytes(buffer, sizeof(buffer), wth->fh, err); if (buffer[0] == PPPD_RESET_TIME && |