From 0a5ea499ecd75eb8f3ec764dd73fba4e228eeabb Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 15 Nov 2004 17:27:07 +0000 Subject: [PATCH] r3762: - only load the readed bytes into the input buffer - fix compiler warnings with gcc-4.0 metze (This used to be commit 7a931ea0f4884d866bbb05b7b81f8e0598364813) --- source4/ldap_server/ldap_server.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c index 9338baa165f..9f256b0b8b3 100644 --- a/source4/ldap_server/ldap_server.c +++ b/source4/ldap_server/ldap_server.c @@ -173,6 +173,7 @@ static BOOL read_into_buf(struct socket_context *sock, struct rw_buffer *buf) talloc_free(tmp_blob.data); return False; } + tmp_blob.length = nread; ret = ldapsrv_append_to_buf(buf, tmp_blob.data, tmp_blob.length); @@ -188,7 +189,7 @@ static BOOL ldapsrv_read_buf(struct ldapsrv_connection *conn) DATA_BLOB creds; BOOL ret; uint8_t *buf; - int buf_length, sasl_length; + size_t buf_length, sasl_length; struct socket_context *sock = conn->connection->socket; TALLOC_CTX *mem_ctx; size_t nread; @@ -445,7 +446,7 @@ static void ldapsrv_recv(struct server_connection *conn, struct timeval t, { struct ldapsrv_connection *ldap_conn = conn->private_data; uint8_t *buf; - int buf_length, msg_length; + size_t buf_length, msg_length; DATA_BLOB blob; struct asn1_data data; struct ldapsrv_call *call; -- 2.11.4.GIT