diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-01-03 14:39:15 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-01-03 14:39:15 +0000 |
commit | f212479e9ab13c79a9277dfef4924d8f9ce442eb (patch) | |
tree | db5b916b200b2919f5ce8eb7128f5d658e3cfa1a /src/libunixonacid | |
parent | ee79b9d4f6df1faedabc8bc468a1801661738ff8 (diff) | |
download | skalibs-f212479e9ab13c79a9277dfef4924d8f9ce442eb.tar.xz |
Easier error reporting in unixmessage_handle
Diffstat (limited to 'src/libunixonacid')
-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 ; |