summaryrefslogtreecommitdiff
path: root/sysdep/unix/main.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2023-04-02 19:15:22 +0200
committerMaria Matejka <mq@ucw.cz>2023-04-04 17:00:59 +0200
commit836e857b3098f8962c621a33f7ae5b532cf512f3 (patch)
tree96c62361fd7b2dd57cecdf9d9b9323f8aa95f021 /sysdep/unix/main.c
parent571c4f69bfbcf437d848b332bb2f4995fea2347d (diff)
Sockets: Unified API for main and other loops
Now sk_open() requires an explicit IO loop to open the socket in. Also specific functions for socket RX pause / resume are added to allow for BGP corking. And last but not least, socket reloop is now synchronous to resolve weird cases of the target loop stopping before actually picking up the relooped socket. Now the caller must ensure that both loops are locked while relooping, and this way all sockets always have their respective loop.
Diffstat (limited to 'sysdep/unix/main.c')
-rw-r--r--sysdep/unix/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c
index a9ae842a..79db32d3 100644
--- a/sysdep/unix/main.c
+++ b/sysdep/unix/main.c
@@ -542,7 +542,7 @@ cli_init_unix(uid_t use_uid, gid_t use_gid)
/* Return value intentionally ignored */
unlink(path_control_socket);
- if (sk_open_unix(s, path_control_socket) < 0)
+ if (sk_open_unix(s, &main_birdloop, path_control_socket) < 0)
die("Cannot create control socket %s: %m", path_control_socket);
if (use_uid || use_gid)