void-packages/srcpkgs/abduco/patches/0004-Correct-EOF-handling-on-client-stdin.patch
Nathan Owens bdbbf00584 abduco: Added various patches for improvement
Added various patches from upstream, since the project
appears dead and these won't be released

Signed-off-by: Nathan Owens <ndowens04@gmail.com>
2019-12-03 13:24:25 +01:00

28 lines
704 B
Diff

From 98e293c54aa08cbee14674c82159d851bd8b9d56 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= <mat@brain-dump.org>
Date: Sat, 17 Mar 2018 10:32:40 +0100
Subject: [PATCH 4/4] Correct EOF handling on client stdin
Previously we would end in an infinite loop which might be the cause
of #15.
---
client.c | 3 +++
1 file changed, 3 insertions(+)
diff --git client.c client.c
index f26bc8f..6cf70c7 100644
--- client.c
+++ client.c
@@ -129,6 +129,9 @@ static int client_mainloop(void) {
} else if (!(client.flags & CLIENT_READONLY)) {
client_send_packet(&pkt);
}
+ } else if (len == 0) {
+ debug("client-stdin: EOF\n");
+ return -1;
}
}
}
--
2.24.0