#include "librpc/gen_ndr/messaging.h"
#include "librpc/gen_ndr/ndr_messaging.h"
#include "ctdbd_conn.h"
+#include "packet.h"
+#include "messages.h"
/* paths to these include files come from --with-ctdb= in configure */
#include "ctdb.h"
ret = true;
fail:
TALLOC_FREE(outdata.dptr);
- return ret;;
+ return ret;
}
uint32 ctdbd_vnn(const struct ctdbd_connection *conn)
static NTSTATUS ctdb_packet_fd_read_sync(struct packet_context *ctx)
{
- struct timeval timeout;
- struct timeval *ptimeout;
+ int timeout = lp_ctdb_timeout();
- timeout = timeval_set(lp_ctdb_timeout(), 0);
- ptimeout = (timeout.tv_sec != 0) ? &timeout : NULL;
-
- return packet_fd_read_sync(ctx, ptimeout);
+ if (timeout == 0) {
+ timeout = -1;
+ }
+ return packet_fd_read_sync(ctx, timeout);
}
/*
if (!ctdbd_working(conn, conn->our_vnn)) {
DEBUG(2, ("Node is not working, can not connect\n"));
+ status = NT_STATUS_INTERNAL_DB_ERROR;
goto fail;
}