From 8e99b390f2bf91b028aac493280dbe285b0052ca Mon Sep 17 00:00:00 2001 From: Karl Heyes Date: Sun, 1 May 2005 02:30:06 +0000 Subject: [PATCH] safety check, avoid the case of a cyclic cascading fallback svn path=/icecast/trunk/icecast/; revision=9196 --- src/source.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/source.c b/src/source.c index 51267f3b..47306909 100644 --- a/src/source.c +++ b/src/source.c @@ -314,6 +314,11 @@ client_t *source_find_client(source_t *source, int id) */ void source_move_clients (source_t *source, source_t *dest) { + if (strcmp (source->mount, dest->mount) == 0) + { + WARN1 ("src and dst are the same \"%s\", skipping", source->mount); + return; + } /* we don't want the two write locks to deadlock in here */ thread_mutex_lock (&move_clients_mutex);