summaryrefslogtreecommitdiff
path: root/src/trace_output.c
diff options
context:
space:
mode:
authortongzongzhen <[email protected]>2024-05-28 11:47:49 +0800
committertongzongzhen <[email protected]>2024-05-28 11:47:49 +0800
commit0fdcbe595284670fb1595a5bd2363d026dd4200d (patch)
treee230875935ee6107bb74a4248db1eb9fe407f100 /src/trace_output.c
parent1cd860ff387362537b2c92f0731ef752cb9107c8 (diff)
Improve the code
When the job is deleted directly in the CLI, clear the job in the program; fix the crash when the file is not created when merging pcapng files; the versio information contains commit ref. The subscript of the job being used is displayed in monit;
Diffstat (limited to 'src/trace_output.c')
-rw-r--r--src/trace_output.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/trace_output.c b/src/trace_output.c
index d32bf65..e04834e 100644
--- a/src/trace_output.c
+++ b/src/trace_output.c
@@ -415,6 +415,13 @@ void dp_trace_pcapng_merger(job_bitmap_t job_id)
if (!is_file_exists(dp_trace_output[index].file_bak_path))
{
// Only one file, no need to merge
+ dzlog_info("without %s, no merge action is performed.", dp_trace_output[index].file_bak_path);
+ goto end;
+ }
+
+ if (dp_trace_output[index].pcapng == NULL)
+ {
+ dzlog_info("%s is not opened, no merge action is performed.", dp_trace_output[index].file_path);
goto end;
}