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.
This commit is contained in:
parent
127f2f99f3
commit
b23bf13283
9 changed files with 15 additions and 19 deletions
|
@ -36,7 +36,6 @@
|
|||
|
||||
typedef struct connection_status_t {
|
||||
unsigned int pinged:1; /* sent ping */
|
||||
unsigned int active:1; /* 1 if active.. */
|
||||
unsigned int connecting:1; /* 1 if we are waiting for a non-blocking connect() to finish */
|
||||
unsigned int unused_termreq:1; /* the termination of this connection was requested */
|
||||
unsigned int remove_unused:1; /* Set to 1 if you want this connection removed */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue