Only pre-seed asynchronous authenticators

Only asynchronous authenticators require the thread-specific loading of
users as the synchronous ones all share the same data. If the service does
not declare asynchronous capabilities at startup, the users are not
seeded. This prevents unnecessary loading of users at startup.
This commit is contained in:
Markus Mäkelä 2018-01-09 13:29:30 +02:00
parent a4dc99d07c
commit 6ee5307624

View File

@ -2837,7 +2837,10 @@ bool service_thread_init()
for (SERVICE* service = allServices; service; service = service->next)
{
service_refresh_users(service);
if (service->capabilities & ACAP_TYPE_ASYNC)
{
service_refresh_users(service);
}
}
spinlock_release(&service_spin);