summaryrefslogtreecommitdiff
path: root/src/libunixonacid/unixmessage_handle.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-07-27 20:21:38 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-07-27 20:21:38 +0000
commit29f104d8e0b46595d8e7a5d315a9ec3afdf26d43 (patch)
tree469f5e58c4bd89f41f33e4f605862e8a25e8dfb8 /src/libunixonacid/unixmessage_handle.c
parentd7588f1fa9d007184163fe5863f87be41d659177 (diff)
downloadskalibs-29f104d8e0b46595d8e7a5d315a9ec3afdf26d43.tar.xz
Add unixmessage_receiver_hasmsginbuf, fix unixmessage_handle
Diffstat (limited to 'src/libunixonacid/unixmessage_handle.c')
-rw-r--r--src/libunixonacid/unixmessage_handle.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libunixonacid/unixmessage_handle.c b/src/libunixonacid/unixmessage_handle.c
index 9d9de5c..487430d 100644
--- a/src/libunixonacid/unixmessage_handle.c
+++ b/src/libunixonacid/unixmessage_handle.c
@@ -4,9 +4,8 @@
int unixmessage_handle (unixmessage_receiver_t *b, unixmessage_handler_func_t_ref f, void *p)
{
- unsigned int n = UNIXMESSAGE_MAXREADS ;
unsigned int count = 0 ;
- while (n--)
+ while (count < UNIXMESSAGE_MAXREADS || unixmessage_receiver_hasmsginbuf(b))
{
unixmessage_t m ;
int r = unixmessage_receive(b, &m) ;