Lines Matching refs:candidate
508 AuthKeyData* candidate = nullptr; in findAuthKey_() local
522 if (candidate == nullptr || data.useCount < candidate->useCount) { in findAuthKey_()
523 candidate = &data; in findAuthKey_()
529 if (candidate == nullptr) { in findAuthKey_()
533 if (candidate->useCount >= maxUsesPerKey_ && !allowUsingExhaustedKeys) { in findAuthKey_()
537 return candidate; in findAuthKey_()
542 AuthKeyData* candidate; in selectAuthKey() local
545 candidate = findAuthKey_(allowUsingExhaustedKeys, false); in selectAuthKey()
546 if (candidate == nullptr) { in selectAuthKey()
553 candidate = findAuthKey_(allowUsingExhaustedKeys, true); in selectAuthKey()
554 if (candidate == nullptr) { in selectAuthKey()
559 candidate->useCount += 1; in selectAuthKey()
560 return candidate; in selectAuthKey()