From d13eb3a7b9bd81b3a3246e14bdde8907ffb0c8e9 Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Tue, 3 May 2022 07:44:58 +0000 Subject: [PATCH] Feature: Added new dumpfile-* events --- src/source.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/source.c b/src/source.c index e9206d76..d3f9508b 100644 --- a/src/source.c +++ b/src/source.c @@ -636,9 +636,11 @@ static void source_open_dumpfile(source_t *source) { source->dumpfile_start = curtime; stats_event(source->mount, "dumpfile_written", "0"); stats_event_time_iso8601(source->mount, "dumpfile_start"); + event_emit_clientevent("dumpfile-opened", NULL, source->mount); } else { ICECAST_LOG_WARN("Cannot open dump file \"%s\" for appending: %s, disabling.", source->dumpfilename, strerror(errno)); + event_emit_clientevent("dumpfile-error", NULL, source->mount); } } @@ -1532,6 +1534,7 @@ void source_kill_dumpfile(source_t *source) source->dumpfile_written = 0; stats_event(source->mount, "dumpfile_written", NULL); stats_event(source->mount, "dumpfile_start", NULL); + event_emit_clientevent("dumpfile-closed", NULL, source->mount); } health_t source_get_health(source_t *source)