Lines Matching refs:ld

46  *	ldap_compare( ld, "c=us@cn=bob", "userPassword", "secret" )
50 ldap_compare( LDAP *ld, const char *dn, const char *attr, const char *value )
60 if ( ldap_compare_ext( ld, dn, attr, &bv, NULL, NULL, &msgid )
64 return( -1 ); /* error is in ld handle */
70 ldap_compare_ext( LDAP *ld, const char *dn, const char *attr,
90 if ( !NSLDAPI_VALID_LDAP_POINTER( ld )) {
96 LDAP_SET_LDERRNO( ld, lderr, NULL, NULL );
104 LDAP_MUTEX_LOCK( ld, LDAP_MSGID_LOCK );
105 *msgidp = ++ld->ld_msgid;
106 LDAP_MUTEX_UNLOCK( ld, LDAP_MSGID_LOCK );
109 if ( ld->ld_cache_on && ld->ld_cache_compare != NULL ) {
110 LDAP_MUTEX_LOCK( ld, LDAP_CACHE_LOCK );
111 if ( (rc = (ld->ld_cache_compare)( ld, *msgidp,
114 LDAP_MUTEX_UNLOCK( ld, LDAP_CACHE_LOCK );
117 LDAP_MUTEX_UNLOCK( ld, LDAP_CACHE_LOCK );
121 if (( lderr = nsldapi_alloc_ber_with_options( ld, &ber ))
130 LDAP_SET_LDERRNO( ld, lderr, NULL, NULL );
135 if (( lderr = nsldapi_put_controls( ld, serverctrls, 1, ber ))
142 rc = nsldapi_send_initial_request( ld, *msgidp, LDAP_REQ_COMPARE,
145 return( rc < 0 ? LDAP_GET_LDERRNO( ld, NULL, NULL ) : LDAP_SUCCESS );
150 ldap_compare_s( LDAP *ld, const char *dn, const char *attr,
158 return( ldap_compare_ext_s( ld, dn, attr, &bv, NULL, NULL ));
163 ldap_compare_ext_s( LDAP *ld, const char *dn, const char *attr,
170 if (( err = ldap_compare_ext( ld, dn, attr, bvalue, serverctrls,
175 if ( ldap_result( ld, msgid, 1, (struct timeval *)NULL, &res )
177 return( LDAP_GET_LDERRNO( ld, NULL, NULL ) );
180 return( ldap_result2error( ld, res, 1 ) );