From 6d108c6aada4dee42d6991f50b5b5c92d1263f05 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sat, 10 Sep 2005 16:56:04 +0000 Subject: [PATCH] Patch from martin@matuska.org: don't treat all clients as duplicates. svn path=/icecast/trunk/icecast/; revision=10008 --- src/auth.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/auth.c b/src/auth.c index 97ed4620..326a06cb 100644 --- a/src/auth.c +++ b/src/auth.c @@ -238,8 +238,9 @@ static int check_duplicate_logins (source_t *source, client_t *client) node = avl_get_first (source->client_tree); while (node) { - client_t *client = (client_t *)node->key; - if (client->username && strcmp (client->username, client->username) == 0) + client_t *existing_client = (client_t *)node->key; + if (existing_client->username && + strcmp (existing_client->username, client->username) == 0) { avl_tree_unlock (source->client_tree); return 0; @@ -252,8 +253,9 @@ static int check_duplicate_logins (source_t *source, client_t *client) node = avl_get_first (source->pending_tree); while (node) { - client_t *client = (client_t *)node->key; - if (client->username && strcmp (client->username, client->username) == 0) + client_t *existing_client = (client_t *)node->key; + if (existing_client->username && + strcmp (existing_client->username, client->username) == 0) { avl_tree_unlock (source->pending_tree); return 0;