]> 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)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Wed, 16 Aug 2017 09:10:25 +0000 (12:10 +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 14723e7692d8daebf03b8e96dac23e437cbf8256..103816a2839b7f125dc30c702efeef4d47566ec5 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);