diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-21 20:02:43 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-21 20:02:43 +0200 |
commit | 505f97771ab63e32b82592a952ae9cf53adf86b9 (patch) | |
tree | cb57c1d792aadcfe771cabef7471f61da5a0d955 /src/fastd.c | |
parent | 175685ed5fbc0db3a259f9cccb30d0a0be74ad30 (diff) | |
download | fastd-505f97771ab63e32b82592a952ae9cf53adf86b9.tar fastd-505f97771ab63e32b82592a952ae9cf53adf86b9.zip |
Remove vector of new temporary peers
The new poll code has made this second peer list obsolete.
Diffstat (limited to 'src/fastd.c')
-rw-r--r-- | src/fastd.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/fastd.c b/src/fastd.c index 2649ef2..b6dabf1 100644 --- a/src/fastd.c +++ b/src/fastd.c @@ -476,14 +476,6 @@ static void handle_handshake_queue(void) { fastd_resolve_peer(peer, peer->next_remote); } -static void enable_temporaries(void) { - size_t i; - for (i = 0; i < VECTOR_LEN(ctx.peers_temp); i++) - fastd_peer_enable_temporary(VECTOR_INDEX(ctx.peers_temp, i)); - - VECTOR_RESIZE(ctx.peers_temp, 0); -} - static bool maintain_peer(fastd_peer_t *peer) { if (fastd_peer_is_temporary(peer) || fastd_peer_is_established(peer)) { /* check for peer timeout */ @@ -854,7 +846,6 @@ int main(int argc, char *argv[]) { VECTOR_ALLOC(ctx.eth_addrs, 0); VECTOR_ALLOC(ctx.peers, 0); - VECTOR_ALLOC(ctx.peers_temp, 0); fastd_peer_hashtable_init(); @@ -865,8 +856,6 @@ int main(int argc, char *argv[]) { fastd_poll_handle(); - enable_temporaries(); - if (fastd_timed_out(&ctx.next_maintenance)) maintenance(); @@ -907,7 +896,6 @@ int main(int argc, char *argv[]) { fastd_peer_hashtable_free(); - VECTOR_FREE(ctx.peers_temp); VECTOR_FREE(ctx.peers); VECTOR_FREE(ctx.eth_addrs); |