aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2022-03-14 12:11:24 -0700
committerGuy Harris <gharris@sonic.net>2022-03-14 19:12:20 +0000
commit109b92b5d796f2fb64491fe1976257bc976f1f40 (patch)
treefa9fe0a1d1e9dc33aa6cb25774bf19ae3a53d60b /tshark.c
parent304dae33d68d923cd2da6d405d999f8a8527ba71 (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 'tshark.c')
-rw-r--r--tshark.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tshark.c b/tshark.c
index 5244f5670e..f23c4426a9 100644
--- a/tshark.c
+++ b/tshark.c
@@ -3895,14 +3895,14 @@ process_cap_file(capture_file *cf, char *save_file, int out_file_type,
}
}
/* Now close the capture file. */
- if (!wtap_dump_close(pdh, &err, &err_info)) {
+ if (!wtap_dump_close(pdh, NULL, &err, &err_info)) {
cfile_close_failure_message(save_file, err, err_info);
status = PROCESS_FILE_ERROR;
}
} else {
/* We got a write error; it was reported, so just close the dump file
without bothering to check for further errors. */
- wtap_dump_close(pdh, &err, &err_info);
+ wtap_dump_close(pdh, NULL, &err, &err_info);
g_free(err_info);
status = PROCESS_FILE_ERROR;
}