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. --- wiretap/merge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wiretap/merge.c') diff --git a/wiretap/merge.c b/wiretap/merge.c index da4e20b585..05a48ad90a 100644 --- a/wiretap/merge.c +++ b/wiretap/merge.c @@ -952,7 +952,7 @@ merge_process_packets(wtap_dumper *pdh, const int file_type, cb->callback_func(MERGE_EVENT_DONE, count, in_files, in_file_count, cb->data); if (status == MERGE_OK || status == MERGE_USER_ABORTED) { - if (!wtap_dump_close(pdh, err, err_info)) + if (!wtap_dump_close(pdh, NULL, err, err_info)) status = MERGE_ERR_CANT_CLOSE_OUTFILE; } else { /* @@ -963,7 +963,7 @@ merge_process_packets(wtap_dumper *pdh, const int file_type, */ int close_err = 0; gchar *close_err_info = NULL; - (void)wtap_dump_close(pdh, &close_err, &close_err_info); + (void)wtap_dump_close(pdh, NULL, &close_err, &close_err_info); g_free(close_err_info); } -- cgit v1.2.3