diff options
author | Sander Vrijders <[email protected]> | 2018-05-03 12:10:02 +0200 |
---|---|---|
committer | Dimitri Staessens <[email protected]> | 2018-05-03 12:26:48 +0200 |
commit | 12968ba98642bd7057e8e7f41e184ab2d61671ed (patch) | |
tree | 8f3e3706bc8038f795d6f5b758b46126787dde9f /src/irmd/ipcp.c | |
parent | 711777a4c7665db2d7ec8d05105eee29054c8562 (diff) | |
download | ouroboros-12968ba98642bd7057e8e7f41e184ab2d61671ed.tar.gz ouroboros-12968ba98642bd7057e8e7f41e184ab2d61671ed.zip |
lib: Make UNIX socket buffer size configurable0.11.3
This makes the buffer size used by the UNIX sockets configurable. In
case of a lot of IPCPs in the system it might become too small with
the default value, resulting in irm command failures. The user can now
easily configure it with an adequate value.
Signed-off-by: Sander Vrijders <[email protected]>
Signed-off-by: Dimitri Staessens <[email protected]>
Diffstat (limited to 'src/irmd/ipcp.c')
-rw-r--r-- | src/irmd/ipcp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/irmd/ipcp.c b/src/irmd/ipcp.c index 49bf13c9..dc8f1c6e 100644 --- a/src/irmd/ipcp.c +++ b/src/irmd/ipcp.c @@ -53,7 +53,7 @@ ipcp_msg_t * send_recv_ipcp_msg(pid_t pid, ipcp_msg_t * msg) { int sockfd = 0; - uint8_t buf[IPCP_MSG_BUF_SIZE]; + uint8_t buf[SOCK_BUF_SIZE]; char * sock_path = NULL; ssize_t len; ipcp_msg_t * recv_msg = NULL; @@ -116,7 +116,7 @@ ipcp_msg_t * send_recv_ipcp_msg(pid_t pid, ipcp_msg__pack(msg, buf); if (write(sockfd, buf, len) != -1) - len = read(sockfd, buf, IPCP_MSG_BUF_SIZE); + len = read(sockfd, buf, SOCK_BUF_SIZE); if (len > 0) recv_msg = ipcp_msg__unpack(NULL, len, buf); |