summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-18 07:54:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:25 -0500
commit56b79e945f1e28d1ba7296e44a9802c140b942ef (patch)
treec48481133b6826608451b38bf3290f41f11e5ca9
parentf8b60c8b1a81fab3c12eff7905e7852e07f5118f (diff)
downloadsamba-56b79e945f1e28d1ba7296e44a9802c140b942ef.tar.gz
samba-56b79e945f1e28d1ba7296e44a9802c140b942ef.tar.bz2
samba-56b79e945f1e28d1ba7296e44a9802c140b942ef.zip
r7713: fixed error display in ildap_search()
(This used to be commit abc9f4bd89d0eda655f7de01db49cbbb64682bf4)
-rw-r--r--source4/libcli/ldap/ldap_ildap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/libcli/ldap/ldap_ildap.c b/source4/libcli/ldap/ldap_ildap.c
index cfcb79f64f..541797c25c 100644
--- a/source4/libcli/ldap/ldap_ildap.c
+++ b/source4/libcli/ldap/ldap_ildap.c
@@ -189,6 +189,12 @@ NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn,
struct ldap_message *res;
status = ldap_result_n(req, i, &res);
if (!NT_STATUS_IS_OK(status)) break;
+
+ if (res->type == LDAP_TAG_SearchResultDone) {
+ status = ldap_check_response(conn, &res->r.GeneralResult);
+ break;
+ }
+
if (res->type != LDAP_TAG_SearchResultEntry) continue;
(*results) = talloc_realloc(conn, *results, struct ldap_message *, n+2);