lib: Use ctdbd_control_unix in ctdbd_working
authorVolker Lendecke <vl@samba.org>
Sat, 3 Oct 2015 03:06:59 +0000 (20:06 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 7 Oct 2015 21:54:05 +0000 (23:54 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/ctdbd_conn.c

index 30654cb6de172155c64cc43a6bb799f67bb62949..eb585d1897b750c1cdc5429da025d02e95809058 100644 (file)
@@ -203,18 +203,17 @@ static NTSTATUS get_cluster_vnn(struct ctdbd_connection *conn, uint32_t *vnn)
 static bool ctdbd_working(struct ctdbd_connection *conn, uint32_t vnn)
 {
        int32_t cstatus=-1;
-       NTSTATUS status;
        TDB_DATA outdata;
        struct ctdb_node_map *m;
        uint32_t failure_flags;
        bool ok = false;
-       int i;
+       int i, ret;
 
-       status = ctdbd_control(conn, CTDB_CURRENT_NODE,
-                              CTDB_CONTROL_GET_NODEMAP, 0, 0,
-                              tdb_null, talloc_tos(), &outdata, &cstatus);
-       if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(1, ("ctdbd_control failed: %s\n", nt_errstr(status)));
+       ret = ctdbd_control_unix(conn, CTDB_CURRENT_NODE,
+                                CTDB_CONTROL_GET_NODEMAP, 0, 0,
+                                tdb_null, talloc_tos(), &outdata, &cstatus);
+       if (ret != 0) {
+               DEBUG(1, ("ctdbd_control failed: %s\n", strerror(ret)));
                return false;
        }
        if ((cstatus != 0) || (outdata.dptr == NULL)) {