mirror of
https://github.com/samba-team/samba.git
synced 2025-09-17 05:44:20 +03:00
lib: Use ctdbd_control_unix in ctdbd_db_attach
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
committed by
Jeremy Allison
parent
a44894506e
commit
dae02e9adb
@@ -1087,7 +1087,7 @@ NTSTATUS ctdbd_traverse(struct ctdbd_connection *master, uint32_t db_id,
|
|||||||
{
|
{
|
||||||
struct ctdbd_connection *conn;
|
struct ctdbd_connection *conn;
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
|
int ret;
|
||||||
TDB_DATA key, data;
|
TDB_DATA key, data;
|
||||||
struct ctdb_traverse_start t;
|
struct ctdb_traverse_start t;
|
||||||
int cstatus;
|
int cstatus;
|
||||||
@@ -1109,13 +1109,14 @@ NTSTATUS ctdbd_traverse(struct ctdbd_connection *master, uint32_t db_id,
|
|||||||
data.dptr = (uint8_t *)&t;
|
data.dptr = (uint8_t *)&t;
|
||||||
data.dsize = sizeof(t);
|
data.dsize = sizeof(t);
|
||||||
|
|
||||||
status = ctdbd_control(conn, CTDB_CURRENT_NODE,
|
ret = ctdbd_control_unix(conn, CTDB_CURRENT_NODE,
|
||||||
CTDB_CONTROL_TRAVERSE_START, conn->rand_srvid, 0,
|
CTDB_CONTROL_TRAVERSE_START, conn->rand_srvid,
|
||||||
data, NULL, NULL, &cstatus);
|
0, data, NULL, NULL, &cstatus);
|
||||||
|
|
||||||
if (!NT_STATUS_IS_OK(status) || (cstatus != 0)) {
|
if ((ret != 0) || (cstatus != 0)) {
|
||||||
|
status = map_nt_error_from_unix(ret);
|
||||||
|
|
||||||
DEBUG(0,("ctdbd_control failed: %s, %d\n", nt_errstr(status),
|
DEBUG(0,("ctdbd_control failed: %s, %d\n", strerror(ret),
|
||||||
cstatus));
|
cstatus));
|
||||||
|
|
||||||
if (NT_STATUS_IS_OK(status)) {
|
if (NT_STATUS_IS_OK(status)) {
|
||||||
@@ -1132,7 +1133,6 @@ NTSTATUS ctdbd_traverse(struct ctdbd_connection *master, uint32_t db_id,
|
|||||||
struct ctdb_req_header *hdr = NULL;
|
struct ctdb_req_header *hdr = NULL;
|
||||||
struct ctdb_req_message *m;
|
struct ctdb_req_message *m;
|
||||||
struct ctdb_rec_data *d;
|
struct ctdb_rec_data *d;
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = ctdb_read_packet(conn->fd, conn->timeout, conn, &hdr);
|
ret = ctdb_read_packet(conn->fd, conn->timeout, conn, &hdr);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
Reference in New Issue
Block a user