summaryrefslogtreecommitdiff
path: root/sysdep
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-03-09 09:13:55 +0100
committerMaria Matejka <mq@ucw.cz>2022-03-09 09:13:55 +0100
commiteeec9ddbf2a3536417c6dd434da9a7dd2bbdaa42 (patch)
tree9dd18398952d50963d0e18395a7f84357ab1b936 /sysdep
parentc78247f9b97802d6fe76d9b7cddf2c1940134d33 (diff)
parent0c59f7ff0112abd1261afb8f21b7c00fc5e37885 (diff)
Merge commit '0c59f7ff' into haugesund
Diffstat (limited to 'sysdep')
-rw-r--r--sysdep/unix/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c
index 392aff9d..cdf0a310 100644
--- a/sysdep/unix/main.c
+++ b/sysdep/unix/main.c
@@ -479,6 +479,14 @@ cli_err(sock *s, int err)
cli_free(s->data);
}
+static void
+cli_connect_err(sock *s UNUSED, int err)
+{
+ ASSERT_DIE(err);
+ if (config->cli_debug)
+ log(L_INFO "Failed to accept CLI connection: %s", strerror(err));
+}
+
static int
cli_connect(sock *s, uint size UNUSED)
{
@@ -507,6 +515,7 @@ cli_init_unix(uid_t use_uid, gid_t use_gid)
s = cli_sk = sk_new(cli_pool);
s->type = SK_UNIX_PASSIVE;
s->rx_hook = cli_connect;
+ s->err_hook = cli_connect_err;
s->rbsize = 1024;
s->fast_rx = 1;