diff options
Diffstat (limited to 'src/libunixonacid/unixmessage_handle.c')
-rw-r--r-- | src/libunixonacid/unixmessage_handle.c | 3 |
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) ; |