diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-19 20:00:36 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-19 20:00:36 +0200 |
commit | 6798a76ffa1b4de4ec0ea07286c3510d86c0e3b6 (patch) | |
tree | a755a36afca70baaab878d391341129eb95e0873 /src/async.c | |
parent | 2e14d72936d1ccfb6faed4a20dec7072fb6d8232 (diff) | |
download | fastd-6798a76ffa1b4de4ec0ea07286c3510d86c0e3b6.tar fastd-6798a76ffa1b4de4ec0ea07286c3510d86c0e3b6.zip |
Store peers as vectors of pointers instead of linked lists
Diffstat (limited to 'src/async.c')
-rw-r--r-- | src/async.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/async.c b/src/async.c index 28895b3..0c37842 100644 --- a/src/async.c +++ b/src/async.c @@ -45,8 +45,10 @@ static void handle_resolve_return(fastd_context_t *ctx) { exit_errno(ctx, "handle_resolve_return: read"); } - fastd_peer_t *peer; - for (peer = ctx->peers; peer; peer = peer->next) { + size_t i; + for (i = 0; i < VECTOR_LEN(ctx->peers); i++) { + fastd_peer_t *peer = VECTOR_INDEX(ctx->peers, i); + if (!peer->config) continue; |