svn commit: samba r23864 - in branches/SAMBA_3_2_0/source/lib: .

metze at samba.org metze at samba.org
Fri Jul 13 10:41:29 GMT 2007


Author: metze
Date: 2007-07-13 10:41:29 +0000 (Fri, 13 Jul 2007)
New Revision: 23864

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23864

Log:
merge from SAMBA_3_2:

handle NT_STATUS_RETRY and always print out the NTSTATUS string
before calling ctdb_fatal()

metze
Modified:
   branches/SAMBA_3_2_0/source/lib/ctdbd_conn.c


Changeset:
Modified: branches/SAMBA_3_2_0/source/lib/ctdbd_conn.c
===================================================================
--- branches/SAMBA_3_2_0/source/lib/ctdbd_conn.c	2007-07-13 10:40:53 UTC (rev 23863)
+++ branches/SAMBA_3_2_0/source/lib/ctdbd_conn.c	2007-07-13 10:41:29 UTC (rev 23864)
@@ -278,10 +278,13 @@
 	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 @@
 	}
 
 	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 @@
 
 		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");
 		}
 	}



More information about the samba-cvs mailing list