Remove redundant connection_t::status.active field.
authorEtienne Dechamps <etienne@edechamps.fr>
Sat, 12 Jul 2014 10:57:03 +0000 (11:57 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Sat, 12 Jul 2014 12:21:48 +0000 (14:21 +0200)
commitb23bf132838156d2fe5a18d50a2b5e068ae18ec3
tree80720499d9eca7e9219f02caa78fc064da808fe4
parent127f2f99f3d43e0565782750f26f1d3980c72711
Remove redundant connection_t::status.active field.

The only places where connection_t::status.active is modified is in
ack_h() and terminate_connection(). In both cases, connection_t::edge
is added and removed at the same time, and that's the only places
connection_t::edge is set. Therefore, the following is true at all
times:

    !c->status.active == !c->edge

This commit removes the redundant state information by getting rid of
connection_t::status.active, and using connection_t::edge instead.
src/connection.h
src/control.c
src/meta.c
src/net.c
src/net_packet.c
src/net_socket.c
src/protocol_auth.c
src/protocol_key.c
src/route.c