You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lirc/0009-lircd-handle-larger-co...

41 lines
1.1 KiB

From 5efb56bf22a5077db564c766ba7cc37bc269231d Mon Sep 17 00:00:00 2001
From: Jarod Wilson <jarod@redhat.com>
Date: Wed, 6 Apr 2011 11:04:12 -0400
Subject: [PATCH 09/17] lircd: handle larger config files in write_socket
better
Pointed out by Michael Zanetti on list, irsend LIST has issues with long
config files, which didn't exist in maintainer mode, as we were using a
do while loop to make sure we spit out everything. Just use that loop
all the time.
Signed-off-by: Jarod Wilson <jarod@redhat.com>
---
daemons/lircd.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/daemons/lircd.c b/daemons/lircd.c
index 6c21a3a..ddcca05 100644
--- a/daemons/lircd.c
+++ b/daemons/lircd.c
@@ -231,14 +231,10 @@ inline int write_socket(int fd, const char *buf, int len)
int done, todo = len;
while (todo) {
-#ifdef SIM_REC
do {
done = write(fd, buf, todo);
- }
- while (done < 0 && errno == EAGAIN);
-#else
- done = write(fd, buf, todo);
-#endif
+ } while (done < 0 && errno == EAGAIN);
+
if (done <= 0)
return (done);
buf += done;
--
1.8.3.1