summaryrefslogtreecommitdiff
path: root/proto/bgp/bgp.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2004-05-31 21:48:19 +0000
committerMartin Mares <mj@ucw.cz>2004-05-31 21:48:19 +0000
commit38a608c55af7654f23c9a16129ab6211aac3b7ab (patch)
treeebe43e728b3e7fcbb7679ae4d52ba5deab9fdeae /proto/bgp/bgp.c
parent206f59dfa8e59e32f4aef12dacb0804581b9f602 (diff)
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.
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r--proto/bgp/bgp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index 3d70192c..b8e2abbc 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -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);