commit f212479e9ab13c79a9277dfef4924d8f9ce442eb parent ee79b9d4f6df1faedabc8bc468a1801661738ff8 Author: Laurent Bercot <ska-skaware@skarnet.org> Date: Sat, 3 Jan 2015 14:39:15 +0000 Easier error reporting in unixmessage_handle Diffstat:
M | src/libunixonacid/unixmessage_handle.c | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git 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 ;