From be6f9df95c4788c8c8c024784c7982f022bd23d6 Mon Sep 17 00:00:00 2001 From: Ian-Clowes <65678428+Ian-Clowes@users.noreply.github.com> Date: Sun, 2 Aug 2020 15:15:36 +0100 Subject: [PATCH] datastorage: fixed use of wrong client search --- src/storage/datastorage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storage/datastorage.c b/src/storage/datastorage.c index 4cc869b..49c09c4 100644 --- a/src/storage/datastorage.c +++ b/src/storage/datastorage.c @@ -766,13 +766,13 @@ client *client_array_get_client(const struct dawn_mac client_addr) { //pthread_mutex_lock(&client_array_mutex); #ifndef DAWN_CLIENT_SCAN_BC_ONLY + client* ret = *client_find_first_c_entry(client_addr); +#else client* ret = client_set_bc; while (ret != NULL && !mac_is_equal_bb(client_addr, ret->client_addr)) { ret = ret->next_entry_bc; } -#else - client* ret = *client_find_first_c_entry(client_addr); #endif if (ret != NULL && !mac_is_equal_bb(client_addr, ret->client_addr))