]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-ldap: Store error if sending request to LDAP fails
authorAki Tuomi <aki.tuomi@dovecot.fi>
Thu, 20 Jul 2017 05:48:30 +0000 (08:48 +0300)
committerTimo Sirainen <tss@dovecot.fi>
Sun, 30 Jul 2017 08:08:56 +0000 (11:08 +0300)
If the request cannot be sent e.g. due to bad search filter
store the error into the result.

Fixes Panic: file ldap-connection.c: line 709 (ldap_result_has_failed): assertion failed: ((result->openldap_ret == LDAP_SUCCESS) == (result->error_string == NULL))

src/lib-ldap/ldap-connection.c

index f0e00a359c4ee19d583ce21afb9e4aeb23268fd4..bdd651d45093ca1d394c99c59005ed0abe9ae7d7 100644 (file)
@@ -284,6 +284,7 @@ void ldap_connection_send_next(struct ldap_connection *conn)
 
                i_zero(&res);
                res.openldap_ret = ret;
+               res.error_string = error;
                if (req->result_callback != NULL)
                        req->result_callback(&res, req->result_callback_ctx);