From 2fdfbc218be09a6335df8dde15498f75fa12bc0a Mon Sep 17 00:00:00 2001 From: liuchao Date: Thu, 6 Feb 2020 06:44:51 +0000 Subject: [PATCH] feature: enable irqbalance to link with multiple clients at the same time Type:bugfix/CVE/requirement/cleancode/testcode CVE: DTS/AR: reason: --- irqbalance.c | 2 +- irqbalance.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/irqbalance.c b/irqbalance.c index 1af23c6..dc8307d 100644 --- a/irqbalance.c +++ b/irqbalance.c @@ -622,7 +622,7 @@ int init_socket() log(TO_ALL, LOG_WARNING, "Unable to set socket options.\n"); return 1; } - listen(socket_fd, 1); + listen(socket_fd, MAX_CLIENT_NUM); g_unix_fd_add(socket_fd, G_IO_IN, sock_handle, NULL); return 0; } diff --git a/irqbalance.h b/irqbalance.h index 61b39dd..2d59d31 100644 --- a/irqbalance.h +++ b/irqbalance.h @@ -177,5 +177,7 @@ extern unsigned int log_mask; #define SOCKET_PATH "irqbalance" #define SOCKET_TMPFS "/var/run" #define SOCKET_RECV_BUF_LEN 4096 +#define MAX_CLIENT_NUM 32 + #endif /* __INCLUDE_GUARD_IRQBALANCE_H_ */ -- 2.19.1