From 82f1ebf52a875e371389b0b892c373bd66ca5269 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Tue, 7 Mar 2006 19:12:43 +0000 Subject: [PATCH] When falling back from a full source to another source, ensure the other source actually exists. svn path=/icecast/trunk/icecast/; revision=10972 --- src/auth.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/auth.c b/src/auth.c index 7f47b5e4..71d22f5d 100644 --- a/src/auth.c +++ b/src/auth.c @@ -286,6 +286,12 @@ static int add_client_to_source (source_t *source, client_t *client) if (loop && source->fallback_when_full && source->fallback_mount) { source_t *next = source_find_mount (source->fallback_mount); + if (!next) { + ERROR1("Fallback '%s' for full source '%s' not found", + source->mount, source->fallback_mount); + return -1; + } + INFO1 ("stream full trying %s", next->mount); source = next; loop--;