Skip to content

Commit

Permalink
Fix another incorrect ldap_result return value check.
Browse files Browse the repository at this point in the history
  • Loading branch information
samskivert committed Jan 25, 2017
1 parent 37137c5 commit 4952ec8
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 @@ -415,7 +415,7 @@ - (BOOL) compare: (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 4952ec8

Please sign in to comment.