1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-28 11:42:03 +03:00

r7801: the ldap server needs this logic too

(This used to be commit 1dbb5bf2c1)
This commit is contained in:
Andrew Tridgell
2005-06-21 06:08:40 +00:00
committed by Gerald (Jerry) Carter
parent f0420c0292
commit a7bbc024ed
2 changed files with 12 additions and 0 deletions

View File

@ -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);