From 629af178974117c94f35f426a902c9aed32eae53 Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Sat, 17 Sep 2022 17:48:50 +0000 Subject: [PATCH] Feature: Pass source to source-(dis)connect events --- src/source.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/source.c b/src/source.c index ef142113..4eb8edc8 100644 --- a/src/source.c +++ b/src/source.c @@ -712,7 +712,7 @@ static void source_init (source_t *source) source->prev_listeners = -1; source->running = 1; - event_emit_clientevent("source-connect", source->client, source->mount); + event_emit_va("source-connect", EVENT_EXTRA_SOURCE, source, EVENT_EXTRA_CLIENT, source->client, EVENT_EXTRA_LIST_END); /* ** Now, if we have a fallback source and override is on, we want @@ -927,7 +927,7 @@ static void source_shutdown (source_t *source) ICECAST_LOG_INFO("Source at \"%s\" exiting", source->mount); } - event_emit_clientevent("source-disconnect", source->client, source->mount); + event_emit_va("source-disconnect", EVENT_EXTRA_SOURCE, source, EVENT_EXTRA_CLIENT, source->client, EVENT_EXTRA_LIST_END); /* we have de-activated the source now, so no more clients will be * added, now move the listeners we have to the fallback (if any)