From 72075d0d0dd97c54d2317b325bfec55a7d496f82 Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Mon, 15 Aug 2016 13:51:12 +0200 Subject: [PATCH] Fix: Fixed regression introduced by r19250. This fixes the regression introduced by r19250 (461a537561580cb32dac327bae73f7e670188bd4). The fix checks if the source client is actually known before printing it's IP-Address. See also: #2016 --- src/source.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/source.c b/src/source.c index 70053e95..719835a3 100644 --- a/src/source.c +++ b/src/source.c @@ -869,7 +869,11 @@ void source_main (source_t *source) static void source_shutdown (source_t *source) { source->running = 0; - ICECAST_LOG_INFO("Source from %s at \"%s\" exiting", source->con->ip, source->mount); + if (source->con && source->con->ip) { + ICECAST_LOG_INFO("Source from %s at \"%s\" exiting", source->con->ip, source->mount); + } else { + ICECAST_LOG_INFO("Source at \"%s\" exiting", source->mount); + } event_emit_clientevent("source-disconnect", source->client, source->mount);