aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/toshiba.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2001-03-10 06:33:58 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2001-03-10 06:33:58 +0000
commitd0e1d260aeef69a69f9cb588a11b8e41db3d46bb (patch)
treec5e776c62f153404ad4617c940bafc4c4fb4d74f /wiretap/toshiba.c
parent2cf974f488e4d4b031a52de2df64398fa1811f13 (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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3123 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'wiretap/toshiba.c')
-rw-r--r--wiretap/toshiba.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/wiretap/toshiba.c b/wiretap/toshiba.c
index de53d08bb6..daafe782e5 100644
--- a/wiretap/toshiba.c
+++ b/wiretap/toshiba.c
@@ -1,6 +1,6 @@
/* toshiba.c
*
- * $Id: toshiba.c,v 1.14 2000/11/19 03:47:36 guy Exp $
+ * $Id: toshiba.c,v 1.15 2001/03/10 06:33:58 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
@@ -182,9 +182,7 @@ static gboolean toshiba_check_file_type(wtap *wth)
/* XXX - return -1 on I/O error and actually do something with 'err'. */
int toshiba_open(wtap *wth, int *err)
{
- /* Reset file position and look for Toshiba header */
- file_seek(wth->fh, 0, SEEK_SET);
-
+ /* Look for Toshiba header */
if (!toshiba_check_file_type(wth)) {
return 0;
}