libctdb: ctdb_service() never returns < 0
[sahlberg/ctdb.git] / libctdb / sync.c
index d60552af70bcafcdd131e563239fdb9734e0760c..43db2cf6b5a05ffaa7d43274ec4caab5d8401778 100644 (file)
@@ -45,7 +45,7 @@ static struct ctdb_request *synchronous(struct ctdb_connection *ctdb,
                        DEBUG(ctdb, LOG_ERR, "ctdb_synchronous: poll failed");
                        return NULL;
                }
-               if (ctdb_service(ctdb, fds.revents) < 0) {
+               if (!ctdb_service(ctdb, fds.revents)) {
                        /* It can have failed after it completed request. */
                        if (!*done)
                                ctdb_cancel(ctdb, req);