aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/dbs-etherwatch.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-06-07 07:27:35 +0000
committerGuy Harris <guy@alum.mit.edu>2002-06-07 07:27:35 +0000
commit2aad75bb826b45ee1a78be2bbe2687e488748f8b (patch)
treefc165ec22e943d3b15a10b6c8c84359286432e05 /wiretap/dbs-etherwatch.c
parentc15486768a2d90fcf97ca8ea628f3d174ad11a5b (diff)
Graeme Hewson noted that zlib has a bug wherein "gzseek()" doesn't set
the internal z_err value for the stream if an "fseek()" call it makes fails, so that if "gzerror()" is subsequently called, it returns Z_OK rather than an error. To work around this, we pass "file_seek()" an "int *err", and have the with-zlib version of "file_seek()" check, if "gzseek()" fails, whether the return value of "file_error()" is 0 and, if so, have it return "errno" instead. svn path=/trunk/; revision=5642
Diffstat (limited to 'wiretap/dbs-etherwatch.c')
-rw-r--r--wiretap/dbs-etherwatch.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/wiretap/dbs-etherwatch.c b/wiretap/dbs-etherwatch.c
index fbe3d582fd..66a81232e6 100644
--- a/wiretap/dbs-etherwatch.c
+++ b/wiretap/dbs-etherwatch.c
@@ -1,6 +1,6 @@
/* dbs-etherwatch.c
*
- * $Id: dbs-etherwatch.c,v 1.7 2002/03/05 08:39:29 guy Exp $
+ * $Id: dbs-etherwatch.c,v 1.8 2002/06/07 07:27:34 guy Exp $
*
* Wiretap Library
* Copyright (c) 2001 by Marc Milgram <mmilgram@arrayinc.com>
@@ -230,10 +230,8 @@ dbs_etherwatch_seek_read (wtap *wth, long seek_off,
{
int pkt_len;
- if (file_seek(wth->random_fh, seek_off - 1, SEEK_SET) == -1) {
- *err = file_error(wth->random_fh);
+ if (file_seek(wth->random_fh, seek_off - 1, SEEK_SET, err) == -1)
return FALSE;
- }
pkt_len = parse_dbs_etherwatch_rec_hdr(NULL, wth->random_fh, err);