From 109b92b5d796f2fb64491fe1976257bc976f1f40 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 14 Mar 2022 12:11:24 -0700 Subject: 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. --- editcap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'editcap.c') diff --git a/editcap.c b/editcap.c index 555888ac37..9dfa26d8c7 100644 --- a/editcap.c +++ b/editcap.c @@ -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; -- cgit v1.2.3