svn commit: samba r7801 - in branches/SAMBA_4_0/source/ldap_server: .

tridge at samba.org tridge at samba.org
Tue Jun 21 06:08:41 GMT 2005


Author: tridge
Date: 2005-06-21 06:08:40 +0000 (Tue, 21 Jun 2005)
New Revision: 7801

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

Log:
the ldap server needs this logic too

Modified:
   branches/SAMBA_4_0/source/ldap_server/ldap_server.c
   branches/SAMBA_4_0/source/ldap_server/ldap_server.h


Changeset:
Modified: branches/SAMBA_4_0/source/ldap_server/ldap_server.c
===================================================================
--- branches/SAMBA_4_0/source/ldap_server/ldap_server.c	2005-06-21 06:03:11 UTC (rev 7800)
+++ branches/SAMBA_4_0/source/ldap_server/ldap_server.c	2005-06-21 06:08:40 UTC (rev 7801)
@@ -245,6 +245,11 @@
 	NTSTATUS status;
 	size_t npending, nread;
 
+	if (conn->processing) {
+		EVENT_FD_NOT_READABLE(c->event.fde);
+		return;
+	}
+
 	/* work out how much data is pending */
 	status = tls_socket_pending(conn->tls, &npending);
 	if (!NT_STATUS_IS_OK(status)) {
@@ -279,12 +284,16 @@
 	}
 	conn->partial.length += nread;
 
+	conn->processing = True;
 	/* see if we can decode what we have */
 	if (conn->enable_wrap) {
 		ldapsrv_try_decode_wrapped(conn);
 	} else {
 		ldapsrv_try_decode_plain(conn);
 	}
+	conn->processing = False;
+
+	EVENT_FD_READABLE(c->event.fde);
 }
 	
 /*
@@ -338,6 +347,7 @@
 	conn->send_queue  = NULL;
 	conn->connection  = c;
 	conn->service     = talloc_get_type(c->private, struct ldapsrv_service);
+	conn->processing  = False;
 	c->private        = conn;
 
 	port = socket_get_my_port(c->socket);

Modified: branches/SAMBA_4_0/source/ldap_server/ldap_server.h
===================================================================
--- branches/SAMBA_4_0/source/ldap_server/ldap_server.h	2005-06-21 06:03:11 UTC (rev 7800)
+++ branches/SAMBA_4_0/source/ldap_server/ldap_server.h	2005-06-21 06:08:40 UTC (rev 7801)
@@ -39,6 +39,8 @@
 		struct ldapsrv_send *next, *prev;
 		DATA_BLOB data;
 	} *send_queue;
+
+	BOOL processing;
 };
 
 struct ldapsrv_call {



More information about the samba-cvs mailing list