summaryrefslogtreecommitdiff
path: root/src/ipcpd
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2018-05-03 12:10:02 +0200
committerDimitri Staessens <dimitri.staessens@ugent.be>2018-05-03 12:26:48 +0200
commit12968ba98642bd7057e8e7f41e184ab2d61671ed (patch)
tree8f3e3706bc8038f795d6f5b758b46126787dde9f /src/ipcpd
parent711777a4c7665db2d7ec8d05105eee29054c8562 (diff)
downloadouroboros-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 <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Diffstat (limited to 'src/ipcpd')
-rw-r--r--src/ipcpd/ipcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index dfb88057..8dc7751a 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -55,7 +55,7 @@
struct cmd {
struct list_head next;
- uint8_t cbuf[IPCP_MSG_BUF_SIZE];
+ uint8_t cbuf[SOCK_BUF_SIZE];
size_t len;
int fd;
};
@@ -146,7 +146,7 @@ static void * acceptloop(void * o)
break;
}
- cmd->len = read(csockfd, cmd->cbuf, IPCP_MSG_BUF_SIZE);
+ cmd->len = read(csockfd, cmd->cbuf, SOCK_BUF_SIZE);
if (cmd->len <= 0) {
log_err("Failed to read from socket.");
close(csockfd);