stuff unexpected LDAP errors into ldc->reason, not just in trace messages.

fix some enormously long lines introduced recently.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1689694 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Eric Covener
2015-07-07 14:43:31 +00:00
parent 4704d888c2
commit 57acd8e40e

View File

@ -1097,7 +1097,9 @@ static int uldap_cache_compare(request_rec *r, util_ldap_connection_t *ldc,
ldc->reason = "Comparison no such attribute (cached)";
}
else {
ldc->reason = "Comparison undefined (cached)";
ldc->reason = apr_psprintf(r->pool,
"Comparison undefined: (%d): %s (adding to cache)",
result, ldap_err2string(result));
}
/* record the result code to return with the reason... */
@ -1105,7 +1107,9 @@ static int uldap_cache_compare(request_rec *r, util_ldap_connection_t *ldc,
/* and unlock this read lock */
LDAP_CACHE_UNLOCK();
ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, "ldap_compare_s(%pp, %s, %s, %s) = %s (cached)", ldc->ldap, dn, attrib, value, ldap_err2string(result));
ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r,
"ldap_compare_s(%pp, %s, %s, %s) = %s (cached)",
ldc->ldap, dn, attrib, value, ldap_err2string(result));
return result;
}
}
@ -1200,11 +1204,16 @@ start_over:
ldc->reason = "Comparison no such attribute (adding to cache)";
}
else {
ldc->reason = apr_psprintf(r->pool,
"Comparison undefined: (%d): %s (adding to cache)",
result, ldap_err2string(result));
ldc->reason = "Comparison undefined (adding to cache)";
}
}
ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, "ldap_compare_s(%pp, %s, %s, %s) = %s", ldc->ldap, dn, attrib, value, ldap_err2string(result));
ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r,
"ldap_compare_s(%pp, %s, %s, %s) = %s",
ldc->ldap, dn, attrib, value, ldap_err2string(result));
return result;
}