1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2025-01-03 14:56:34 -05:00

Feature: Added new dumpfile-* events

This commit is contained in:
Philipp Schafft 2022-05-03 07:44:58 +00:00
parent e736bc3933
commit d13eb3a7b9

View File

@ -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)