diff options
author | Leah Neukirchen <leah@vuxu.org> | 2023-12-22 23:17:19 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2023-12-22 23:17:19 +0100 |
commit | 92e34d006f84f168134fefb617cd024db952c323 (patch) | |
tree | 0c9c2bac1e040d591d5577b88fe7baf61e4172be | |
parent | c2595b43c4e643fa60b6f288c1266858eb9b8f14 (diff) | |
download | nitro-92e34d006f84f168134fefb617cd024db952c323.tar.gz nitro-92e34d006f84f168134fefb617cd024db952c323.tar.xz nitro-92e34d006f84f168134fefb617cd024db952c323.zip |
fix ok replies
-rw-r--r-- | nitro.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nitro.c b/nitro.c index 28e7180..7f85f56 100644 --- a/nitro.c +++ b/nitro.c @@ -840,14 +840,14 @@ handle_control_sock() { ok: if (srclen > 0) { char reply[] = "ok\n"; - sendto(controlsock, reply, sizeof reply, + sendto(controlsock, reply, sizeof reply - 1, MSG_DONTWAIT, (struct sockaddr *)&src, srclen); } return; fail: if (srclen > 0) { char reply[] = "error\n"; - sendto(controlsock, reply, sizeof reply, + sendto(controlsock, reply, sizeof reply - 1, MSG_DONTWAIT, (struct sockaddr *)&src, srclen); } } |