summaryrefslogtreecommitdiff
path: root/source4/ldap_server
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-21 06:08:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:37 -0500
commita7bbc024edea5dde86aaf77bc0ace39573a9d19a (patch)
tree4f19d84b4dde4874694fe55b012e92ba42244730 /source4/ldap_server
parentf0420c029299fd503dd6980484e970a9a141d523 (diff)
downloadsamba-a7bbc024edea5dde86aaf77bc0ace39573a9d19a.tar.gz
samba-a7bbc024edea5dde86aaf77bc0ace39573a9d19a.tar.bz2
samba-a7bbc024edea5dde86aaf77bc0ace39573a9d19a.zip
r7801: the ldap server needs this logic too
(This used to be commit 1dbb5bf2c1c6e11b3467b6eb1a2206c6299bc25b)
Diffstat (limited to 'source4/ldap_server')
-rw-r--r--source4/ldap_server/ldap_server.c10
-rw-r--r--source4/ldap_server/ldap_server.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index c006a9e4da..8d2a404ec4 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/ldap_server/ldap_server.c
@@ -245,6 +245,11 @@ static void ldapsrv_recv(struct stream_connection *c, uint16_t flags)
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 @@ static void ldapsrv_recv(struct stream_connection *c, uint16_t flags)
}
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 @@ static void ldapsrv_accept(struct stream_connection *c)
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);
diff --git a/source4/ldap_server/ldap_server.h b/source4/ldap_server/ldap_server.h
index 32b2cffe99..e3031d0177 100644
--- a/source4/ldap_server/ldap_server.h
+++ b/source4/ldap_server/ldap_server.h
@@ -39,6 +39,8 @@ struct ldapsrv_connection {
struct ldapsrv_send *next, *prev;
DATA_BLOB data;
} *send_queue;
+
+ BOOL processing;
};
struct ldapsrv_call {