From b3f805ce29487f790090fcf31096f5a7cf1d585d Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Thu, 20 Apr 2023 21:06:42 +0200 Subject: Socket closing has its dedicated function --- lib/socket.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/socket.h') diff --git a/lib/socket.h b/lib/socket.h index 4b169581..6225977b 100644 --- a/lib/socket.h +++ b/lib/socket.h @@ -88,6 +88,7 @@ sock *sock_new(pool *); /* Allocate new socket */ int sk_open(sock *, struct birdloop *); /* Open socket */ void sk_reloop(sock *, struct birdloop *); /* Move socket to another loop. Both loops must be locked. */ +static inline void sk_close(sock *s) { rfree(&s->r); } /* Explicitly close socket */ int sk_rx_ready(sock *s); _Bool sk_tx_pending(sock *s); -- cgit v1.2.3