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/radcom.c | |
parent | 9b1133892b4a545eb142ce4529a53de353f41410 (diff) |
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/radcom.c')
-rw-r--r-- | wiretap/radcom.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/wiretap/radcom.c b/wiretap/radcom.c index 06ea7bb46b..733e48ff40 100644 --- a/wiretap/radcom.c +++ b/wiretap/radcom.c @@ -1,6 +1,6 @@ /* radcom.c * - * $Id: radcom.c,v 1.28 2000/11/17 21:00:40 gram Exp $ + * $Id: radcom.c,v 1.29 2001/03/10 06:33:58 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -86,7 +86,6 @@ int radcom_open(wtap *wth, int *err) char search_encap[7]; /* Read in the string that should be at the start of a RADCOM file */ - file_seek(wth->fh, 0, SEEK_SET); errno = WTAP_ERR_CANT_READ; bytes_read = file_read(magic, 1, 8, wth->fh); if (bytes_read != 8) { |