diff options
author | Guy Harris <guy@alum.mit.edu> | 2019-01-23 22:39:22 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-01-24 06:42:58 +0000 |
commit | 4f8b3f3d2a76d9afe9021dcb70f9abea5f595201 (patch) | |
tree | 64f6602ecb874ecb54af5a3cba6adba2f55bb4a4 /capinfos.c | |
parent | 5d38999b579f1b618e6bde8a7d752f275aca1fc5 (diff) |
By default, don't stop after a read error.
For close to 10 years, we have defaulted not to stop processing on an
open error; default not to stop processing on a read error, either. -C
causes us to stop for both.
Bug: 15433
Change-Id: I5cd239c160d0ff85eb0425ca4b172532a4659fd3
Reviewed-on: https://code.wireshark.org/review/31710
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'capinfos.c')
-rw-r--r-- | capinfos.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/capinfos.c b/capinfos.c index afab0dbac4..72fb14a6a5 100644 --- a/capinfos.c +++ b/capinfos.c @@ -88,14 +88,14 @@ /* * By default capinfos now continues processing * the next filename if and when wiretap detects - * a problem opening a file. + * a problem opening or reading a file. * Use the '-C' option to revert back to original * capinfos behavior which is to abort any - * additional file processing at first open file - * failure. + * additional file processing at the first file + * open or read failure. */ -static gboolean stop_after_wtap_open_offline_failure = FALSE; +static gboolean stop_after_failure = FALSE; /* * table report variables @@ -1561,7 +1561,7 @@ main(int argc, char *argv[]) break; case 'C': - stop_after_wtap_open_offline_failure = TRUE; + stop_after_failure = TRUE; break; case 'A': @@ -1679,7 +1679,7 @@ main(int argc, char *argv[]) if (!wth) { cfile_open_failure_message("capinfos", argv[opt], err, err_info); overall_error_status = 2; /* remember that an error has occurred */ - if (stop_after_wtap_open_offline_failure) + if (stop_after_failure) goto exit; } @@ -1691,7 +1691,8 @@ main(int argc, char *argv[]) wtap_close(wth); if (status) { overall_error_status = status; - goto exit; + if (stop_after_failure) + goto exit; } } } |