diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2006-01-07 01:29:45 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2006-01-07 01:29:45 +0000 |
commit | 15f905102907db3230fd7a5d46d7e336bc800235 (patch) | |
tree | 40a784efe21469082f0fa6e98feadfd3f8b432d2 /capture_loop.c | |
parent | 76bbd4181b6fbf9184b0c695d5cd8f0d708fa037 (diff) |
move output_to_pipe flag from tethereal's loop_data into capture_opts, so it can be used by dumpcap (capture_loop.c) as well
svn path=/trunk/; revision=16972
Diffstat (limited to 'capture_loop.c')
-rw-r--r-- | capture_loop.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/capture_loop.c b/capture_loop.c index e2302a2d6a..58745e7c12 100644 --- a/capture_loop.c +++ b/capture_loop.c @@ -995,7 +995,7 @@ capture_loop_dispatch(capture_options *capture_opts, loop_data *ld, } -/* open the output file (temporary/specified name/ringbuffer) */ +/* open the output file (temporary/specified name/ringbuffer/named pipe/stdout) */ /* Returns TRUE if the file opened successfully, FALSE otherwise. */ gboolean capture_loop_open_output(capture_options *capture_opts, int *save_file_fd, @@ -1020,7 +1020,7 @@ capture_loop_open_output(capture_options *capture_opts, int *save_file_fd, if (capture_opts->multi_files_on) { /* ringbuffer is enabled; that doesn't work with standard output */ g_snprintf(errmsg, errmsg_len, - "Ring buffer requested, but capture is being written to the standard error."); + "Ring buffer requested, but capture is being written to the standard output."); g_free(capfile_name); return FALSE; } else { @@ -1290,6 +1290,9 @@ capture_loop_start(capture_options *capture_opts, gboolean *stats_known, struct continue; } } /* cnd_autostop_size */ + if (capture_opts->output_to_pipe) { + wtap_dump_flush(ld.wtap_pdh); + } } /* inpkts */ /* Only update once a second (Win32: 500ms) so as not to overload slow displays */ |