If poll() returns 0 (no data) or there is an error, coroipcc_dispatch_get can still return CS_OK.

This patch fixes it to return (fairly) sensible error values

Index: lib/coroipcc.c
===================================================================
--- lib/coroipcc.c      (revision 2394)
+++ lib/coroipcc.c      (working copy)
@@ -819,9 +819,11 @@
                goto error_put;
        } else
        if (poll_events == -1) {
+               error = CS_ERR_LIBRARY;
                goto error_put;
        } else
        if (poll_events == 0) {
+               error = CS_ERR_TRY_AGAIN;
                goto error_put;
        }
        if (poll_events == 1 && (ufds.revents & (POLLERR|POLLHUP))) {
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to