1
0
Fork 0
mirror of https://github.com/pissnet/angiosperm.git synced 2025-08-12 18:31:36 +01:00

authd: change to lists instead of dictionaries for various things

Iteration is the primary thing done on these, so using a dictionary
doesn't help a lot. Furthermore (and most importantly), they are not
safe to delete from.
This commit is contained in:
Elizabeth Myers 2016-04-30 01:56:06 -05:00
parent d71787ab69
commit 49fd293f20
No known key found for this signature in database
GPG key ID: 1A10EF78D83E317B
6 changed files with 112 additions and 75 deletions
authd/providers

View file

@ -112,11 +112,12 @@ client_success(struct auth_client *auth)
static void
rdns_destroy(void)
{
struct auth_client *auth;
rb_dictionary_iter iter;
rb_dlink_node *ptr, *nptr;
RB_DICTIONARY_FOREACH(auth, &iter, auth_clients)
RB_DLINK_FOREACH_SAFE(ptr, nptr, auth_clients.head)
{
struct auth_client *auth = ptr->data;
if(get_provider_data(auth, SELF_PID) != NULL)
client_fail(auth, REPORT_FAIL);
}