From 0f0ef7af6307fb1883e7421998f132975feadd00 Mon Sep 17 00:00:00 2001 From: Maxim Biro Date: Thu, 22 May 2014 04:06:32 -0400 Subject: [PATCH] Fixed nodes never being marked as used --- toxcore/assoc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/toxcore/assoc.c b/toxcore/assoc.c index 50bc3a3e..1015d83e 100644 --- a/toxcore/assoc.c +++ b/toxcore/assoc.c @@ -428,8 +428,7 @@ static uint8_t candidates_create_internal(Assoc *assoc, hash_t hash, uint8_t *id // enumerated lists are superior to magic numbers if (!is_timeout(entry->used_at, BAD_NODE_TIMEOUT)) check = USED; - - if (!is_timeout(entry->seen_at, CANDIDATES_SEEN_TIMEOUT)) + else if (!is_timeout(entry->seen_at, CANDIDATES_SEEN_TIMEOUT)) check = SEENG; else if (!is_timeout(entry->heard_at, CANDIDATES_HEARD_TIMEOUT)) check = SEENB_HEARDG;