From a5438e09af4148abb71d5de70f7e220f0cfbbbdf Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 2 Oct 2015 20:00:32 -0700 Subject: [PATCH] lib: Use ctdbd_control_unix in register_with_ctdbd Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/lib/ctdbd_conn.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index ee93799aa54..e307fafce04 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -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); -- 2.34.1