updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / lirc-bede / lircd-handle-large-config.patch
blob85bc205187145c8723ed88bd95422b261f5f7266
1 From 5efb56bf22a5077db564c766ba7cc37bc269231d Mon Sep 17 00:00:00 2001
2 From: Jarod Wilson <jarod@redhat.com>
3 Date: Wed, 6 Apr 2011 11:04:12 -0400
4 Subject: [PATCH] lircd: handle larger config files in write_socket better
6 Pointed out by Michael Zanetti on list, irsend LIST has issues with long
7 config files, which didn't exist in maintainer mode, as we were using a
8 do while loop to make sure we spit out everything. Just use that loop
9 all the time.
11 Signed-off-by: Jarod Wilson <jarod@redhat.com>
12 ---
13 daemons/lircd.c | 8 ++------
14 1 files changed, 2 insertions(+), 6 deletions(-)
16 diff --git a/daemons/lircd.c b/daemons/lircd.c
17 index 6c21a3a..ddcca05 100644
18 --- a/daemons/lircd.c
19 +++ b/daemons/lircd.c
20 @@ -231,14 +231,10 @@ inline int write_socket(int fd, const char *buf, int len)
21 int done, todo = len;
23 while (todo) {
24 -#ifdef SIM_REC
25 do {
26 done = write(fd, buf, todo);
27 - }
28 - while (done < 0 && errno == EAGAIN);
29 -#else
30 - done = write(fd, buf, todo);
31 -#endif
32 + } while (done < 0 && errno == EAGAIN);
34 if (done <= 0)
35 return (done);
36 buf += done;
37 --
38 1.7.0.1