r18410: Reduce noise in the ldb_ildap backend. We regularly search for things
authorAndrew Bartlett <abartlet@samba.org>
Tue, 12 Sep 2006 00:41:49 +0000 (00:41 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:18:25 +0000 (14:18 -0500)
that don't exist, and this is not a cause for panic.

Andrew Bartlett
(This used to be commit c89e416d288d16de43ae93102ecfec588900e6c0)

source4/lib/ldb/ldb_ildap/ldb_ildap.c

index f521425312a31368a38fdcd3364c6c2f07904233..0f6391d7eb1806c73e2473a5c1fd5502ef06c403 100644 (file)
@@ -124,8 +124,7 @@ static int ildb_map_error(struct ildb_private *ildb, NTSTATUS status)
        if (NT_STATUS_IS_OK(status)) {
                return LDB_SUCCESS;
        }
-       talloc_free(ildb->ldb->err_string);
-       ildb->ldb->err_string = talloc_strdup(ildb, ldap_errstr(ildb->ldap, status));
+       ldb_set_errstring(ildb->ldb, ldap_errstr(ildb->ldap, status));
        if (NT_STATUS_IS_LDAP(status)) {
                return NT_STATUS_LDAP_CODE(status);
        }
@@ -246,7 +245,6 @@ static void ildb_callback(struct ldap_request *req)
 
                                status = ldap_check_response(req->conn, &msg->r.GeneralResult);
                                if (!NT_STATUS_IS_OK(status)) {
-                                       ldb_debug(ac->module->ldb, LDB_DEBUG_ERROR, "Error: %s\n" ,ldap_errstr(req->conn, status));
                                        handle->status = ildb_map_error(ildb, status);
                                        return;
                                }