diff options
author | Guy Harris <gharris@sonic.net> | 2022-03-14 12:11:24 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2022-03-14 19:12:20 +0000 |
commit | 109b92b5d796f2fb64491fe1976257bc976f1f40 (patch) | |
tree | fa9fe0a1d1e9dc33aa6cb25774bf19ae3a53d60b /editcap.c | |
parent | 304dae33d68d923cd2da6d405d999f8a8527ba71 (diff) |
wiretap: have wtap_dump_close() provide a "needs to be reloaded" indication.
This allows the "needs to be reloaded" indication to be set in the close
process, as is the case for ERF; having a routine that returns the value
of that indication is not useful if it gets seet in the close process,
as the handle for the wtap_dumper is no longer valid after
wtap_dump_close() finishes.
We also get rid of wtap_dump_get_needs_reload(), as callers should get
that information via the added argument to wtap_dump_close().
Fixes #17989.
Diffstat (limited to 'editcap.c')
-rw-r--r-- | editcap.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1023,7 +1023,7 @@ editcap_dump_open(const char *filename, const wtap_dump_params *params, int close_err; gchar *close_err_info; - wtap_dump_close(pdh, &close_err, &close_err_info); + wtap_dump_close(pdh, NULL, &close_err, &close_err_info); g_free(close_err_info); wtap_block_unref(if_data_copy); return NULL; @@ -1808,7 +1808,7 @@ main(int argc, char *argv[]) } while (nstime_cmp(&rec->ts, &block_next) > 0) { /* time for the next file */ - if (!wtap_dump_close(pdh, &write_err, &write_err_info)) { + if (!wtap_dump_close(pdh, NULL, &write_err, &write_err_info)) { cfile_close_failure_message(filename, write_err, write_err_info); ret = WRITE_ERROR; @@ -1840,7 +1840,7 @@ main(int argc, char *argv[]) if (split_packet_count != 0) { /* time for the next file? */ if (written_count > 0 && (written_count % split_packet_count) == 0) { - if (!wtap_dump_close(pdh, &write_err, &write_err_info)) { + if (!wtap_dump_close(pdh, NULL, &write_err, &write_err_info)) { cfile_close_failure_message(filename, write_err, write_err_info); ret = WRITE_ERROR; @@ -2272,7 +2272,7 @@ main(int argc, char *argv[]) } } - if (!wtap_dump_close(pdh, &write_err, &write_err_info)) { + if (!wtap_dump_close(pdh, NULL, &write_err, &write_err_info)) { cfile_close_failure_message(filename, write_err, write_err_info); ret = WRITE_ERROR; goto clean_exit; |