1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Rewritten the I/O loop. All socket operations are now safe, meaning that

you can delete the socket from anywhere in the hooks and nothing should break.
Also, the receive/transmit buffers are now regular xmalloc()'ed buffers,
not separate resources which would need shuffling around between pools.

sk_close() is gone, use rfree() instead.
This commit is contained in:
Martin Mares
2004-05-31 21:48:19 +00:00
parent 206f59dfa8
commit 38a608c55a
4 changed files with 89 additions and 66 deletions

View File

@@ -139,7 +139,7 @@ bgp_close_conn(struct bgp_conn *conn)
conn->keepalive_timer = NULL;
rfree(conn->hold_timer);
conn->hold_timer = NULL;
sk_close(conn->sk);
rfree(conn->sk);
conn->sk = NULL;
conn->state = BS_IDLE;
if (conn->error_flag > 1)
@@ -235,7 +235,7 @@ bgp_sock_err(sock *sk, int err)
{
case BS_CONNECT:
case BS_OPENSENT:
sk_close(conn->sk);
rfree(conn->sk);
conn->sk = NULL;
conn->state = BS_ACTIVE;
bgp_start_timer(conn->connect_retry_timer, p->cf->connect_retry_time);