diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libunixonacid/unixmessage_handle.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libunixonacid/unixmessage_handle.c b/src/libunixonacid/unixmessage_handle.c index ad5789c..db92b6c 100644 --- a/src/libunixonacid/unixmessage_handle.c +++ b/src/libunixonacid/unixmessage_handle.c @@ -12,7 +12,8 @@ int unixmessage_handle (unixmessage_receiver_t *b, unixmessage_handler_func_t *f register int r = unixmessage_receive(b, &m) ; if (r < 0) return -1 ; if (!r) break ; - if (!(*f)(&m, p)) return -2 ; + r = (*f)(&m, p) ; + if (r <= 0) return r ; count++ ; } return count ; |