ipa-kdb: fix retry logic in ipadb_deref_search

This function retried an LDAP search when the result was OK due to
flawed logic of retry detection (ipadb_need_retry function which
returns true when we need retry and not 0).

https://fedorahosted.org/freeipa/ticket/3413
This commit is contained in:
Martin Kosek
2013-02-12 16:35:51 +01:00
parent 93ea8a6ac3
commit dfad4396ff

View File

@@ -325,7 +325,7 @@ krb5_error_code ipadb_deref_search(struct ipadb_context *ipactx,
ctrl, NULL,
&std_timeout, LDAP_NO_LIMIT,
res);
retry = !ipadb_need_retry(ipactx, ret) && times > 0;
retry = ipadb_need_retry(ipactx, ret) && times > 0;
if (retry) {
/* Free result before next try */