diff options
Diffstat (limited to 'wiretap/lanalyzer.c')
-rw-r--r-- | wiretap/lanalyzer.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/wiretap/lanalyzer.c b/wiretap/lanalyzer.c index 18b8571c05..095f9d5e0c 100644 --- a/wiretap/lanalyzer.c +++ b/wiretap/lanalyzer.c @@ -1,6 +1,6 @@ /* lanalyzer.c * - * $Id: lanalyzer.c,v 1.34 2002/06/27 22:46:48 guy Exp $ + * $Id: lanalyzer.c,v 1.35 2002/07/16 07:15:08 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -594,12 +594,18 @@ int lanalyzer_dump_can_write_encap(int encap) * Returns TRUE on success, FALSE on failure; sets "*err" to an * error code on failure *---------------------------------------------------*/ -gboolean lanalyzer_dump_open(wtap_dumper *wdh, int *err) +gboolean lanalyzer_dump_open(wtap_dumper *wdh, gboolean cant_seek, int *err) { int jump; void *tmp; - /* This is a LANalyzer file */ + /* This is a LANalyzer file. We can't fill in some fields in the + header until all the packets have been written, so we can't + write to a pipe. */ + if (cant_seek) { + *err = WTAP_ERR_CANT_WRITE_TO_PIPE; + return FALSE; + } tmp = g_malloc(sizeof(LA_TmpInfo)); if (!tmp) { |