summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-07-13 10:40:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:28:35 -0500
commit894a02ef4d53010c59cf7304f935288c99356874 (patch)
tree5757aec407affd61457a44f02583697ea6b3546c /source3
parented0ffc5cef4056121f707a1526688ff323445556 (diff)
downloadsamba-894a02ef4d53010c59cf7304f935288c99356874.tar.gz
samba-894a02ef4d53010c59cf7304f935288c99356874.tar.bz2
samba-894a02ef4d53010c59cf7304f935288c99356874.zip
r23863: handle NT_STATUS_RETRY and always print out the NTSTATUS string
before calling ctdb_fatal() metze (This used to be commit 48ece3c21e3a5e9aa434c847eefaab59274a4e6f)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/ctdbd_conn.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c
index 7862a42652..d9d3421fa7 100644
--- a/source3/lib/ctdbd_conn.c
+++ b/source3/lib/ctdbd_conn.c
@@ -278,10 +278,13 @@ static NTSTATUS ctdb_read_req(struct ctdbd_connection *conn, uint32 reqid,
if (NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_BUSY)) {
/* EAGAIN */
goto again;
+ } else if (NT_STATUS_EQUAL(status, NT_STATUS_RETRY)) {
+ /* EAGAIN */
+ goto again;
}
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(3, ("packet_fd_read failed: %s\n", nt_errstr(status)));
+ DEBUG(0, ("packet_fd_read failed: %s\n", nt_errstr(status)));
cluster_fatal("ctdbd died\n");
}
@@ -297,7 +300,7 @@ static NTSTATUS ctdb_read_req(struct ctdbd_connection *conn, uint32 reqid,
}
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(3, ("Could not read packet: %s\n", nt_errstr(status)));
+ DEBUG(0, ("Could not read packet: %s\n", nt_errstr(status)));
cluster_fatal("ctdbd died\n");
}
@@ -1088,11 +1091,19 @@ NTSTATUS ctdbd_traverse(uint32 db_id,
status = packet_fd_read_sync(conn->pkt);
+ if (NT_STATUS_EQUAL(status, NT_STATUS_RETRY)) {
+ /*
+ * There might be more in the queue
+ */
+ continue;
+ }
+
if (NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE)) {
status = NT_STATUS_OK;
}
if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("packet_fd_read_sync failed: %s\n", nt_errstr(status)));
cluster_fatal("ctdbd died\n");
}
}