lib: Use ctdbd_control_unix in register_with_ctdbd
authorVolker Lendecke <vl@samba.org>
Sat, 3 Oct 2015 03:00:32 +0000 (20:00 -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 ee93799aa54b1ba2a9c8918b809947aa70491b7b..e307fafce043658c7d1ac794c3ce52a7f4b83b05 100644 (file)
@@ -113,16 +113,15 @@ NTSTATUS register_with_ctdbd(struct ctdbd_connection *conn, uint64_t srvid,
                             void *private_data)
 {
 
-       NTSTATUS status;
-       int cstatus;
+       int ret, cstatus;
        size_t num_callbacks;
        struct ctdbd_srvid_cb *tmp;
 
-       status = ctdbd_control(conn, CTDB_CURRENT_NODE,
-                              CTDB_CONTROL_REGISTER_SRVID, srvid, 0,
-                              tdb_null, NULL, NULL, &cstatus);
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
+       ret = ctdbd_control_unix(conn, CTDB_CURRENT_NODE,
+                                CTDB_CONTROL_REGISTER_SRVID, srvid, 0,
+                                tdb_null, NULL, NULL, &cstatus);
+       if (ret != 0) {
+               return map_nt_error_from_unix(ret);
        }
 
        num_callbacks = talloc_array_length(conn->callbacks);