aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorPeter Hatina <phatina@redhat.com>2014-02-03 10:51:07 +0100
committerEvan Huus <eapache@gmail.com>2014-02-03 13:31:27 +0000
commitf62450ff9362058adeabb7fafc91ca69f09b1ede (patch)
tree511aa56dfc7a3f12ee21b584a69a3c337e3bf2b9 /wiretap
parent6d2f865b3513948ca4ab3f76fa4bf1a7f8f07f5a (diff)
allow tshark reading from pipes
Change-Id: If20a14b949667911df44f09c6a705b7645d4c49e Reviewed-on: https://code.wireshark.org/review/85 Reviewed-by: Evan Huus <eapache@gmail.com> Tested-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/file_wrappers.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wiretap/file_wrappers.c b/wiretap/file_wrappers.c
index 3b996f5d3c..93ac29e4da 100644
--- a/wiretap/file_wrappers.c
+++ b/wiretap/file_wrappers.c
@@ -1054,7 +1054,8 @@ file_seek(FILE_T file, gint64 offset, int whence, int *err)
/* if within raw area while reading, just go there */
if (file->compression == UNCOMPRESSED && file->pos + offset >= file->raw
- && (offset < 0 || offset >= file->have) /* seek only when we don't have that offset in buffer */)
+ && (offset < 0 || offset >= file->have) /* seek only when we don't have that offset in buffer */
+ && (file->fast_seek) /* seek only when random access is supported */)
{
if (ws_lseek64(file->fd, offset - file->have, SEEK_CUR) == -1) {
*err = errno;