From: Aki Tuomi Date: Thu, 20 Jul 2017 05:48:30 +0000 (+0300) Subject: lib-ldap: Store error if sending request to LDAP fails X-Git-Tag: 2.2.32.rc2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c3e19570491ac709f3427aef7f804aa4976fb44a;p=thirdparty%2Fdovecot%2Fcore.git lib-ldap: Store error if sending request to LDAP fails 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)) --- diff --git a/src/lib-ldap/ldap-connection.c b/src/lib-ldap/ldap-connection.c index 14723e7692..103816a283 100644 --- a/src/lib-ldap/ldap-connection.c +++ b/src/lib-ldap/ldap-connection.c @@ -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);