Skip to content

Commit

Permalink
Merge pull request #53 from trammell/master
Browse files Browse the repository at this point in the history
master: fixed compare of ldap_result return value
  • Loading branch information
samskivert authored Jan 25, 2017
2 parents 656c6e9 + 182544c commit 5e14aed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TRLDAPConnection.m
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ - (BOOL) compareDN: (TRString *) dn withAttribute: (TRString *) attribute value:
}

/* Wait for the result */
if (ldap_result(ldapConn, msgid, 1, &timeout, &res) == -1) {
if (ldap_result(ldapConn, msgid, 1, &timeout, &res) <= 0) {
err = ldap_get_errno(ldapConn);
if (err == LDAP_TIMEOUT)
ldap_abandon_ext(ldapConn, msgid, NULL, NULL);
Expand Down

0 comments on commit 5e14aed

Please sign in to comment.