Lines Matching refs:ld
43 * ld LDAP descriptor
55 * msgid = ldap_modify( ld, dn, mods );
59 ldap_modify( LDAP *ld, const char *dn, LDAPMod **mods )
65 if ( ldap_modify_ext( ld, dn, mods, NULL, NULL, &msgid )
69 return( -1 ); /* error is in ld handle */
75 ldap_modify_ext( LDAP *ld, const char *dn, LDAPMod **mods,
101 if ( !NSLDAPI_VALID_LDAP_POINTER( ld )) {
106 LDAP_SET_LDERRNO( ld, LDAP_PARAM_ERROR, NULL, NULL );
112 LDAP_SET_LDERRNO( ld, lderr, NULL, NULL );
119 LDAP_MUTEX_LOCK( ld, LDAP_MSGID_LOCK );
120 *msgidp = ++ld->ld_msgid;
121 LDAP_MUTEX_UNLOCK( ld, LDAP_MSGID_LOCK );
124 if ( ld->ld_cache_on && ld->ld_cache_modify != NULL ) {
125 LDAP_MUTEX_LOCK( ld, LDAP_CACHE_LOCK );
126 if ( (rc = (ld->ld_cache_modify)( ld, *msgidp, LDAP_REQ_MODIFY,
129 LDAP_MUTEX_UNLOCK( ld, LDAP_CACHE_LOCK );
132 LDAP_MUTEX_UNLOCK( ld, LDAP_CACHE_LOCK );
136 if (( lderr = nsldapi_alloc_ber_with_options( ld, &ber ))
144 LDAP_SET_LDERRNO( ld, lderr, NULL, NULL );
162 LDAP_SET_LDERRNO( ld, lderr, NULL, NULL );
170 LDAP_SET_LDERRNO( ld, lderr, NULL, NULL );
175 if (( lderr = nsldapi_put_controls( ld, serverctrls, 1, ber ))
182 rc = nsldapi_send_initial_request( ld, *msgidp, LDAP_REQ_MODIFY,
185 return( rc < 0 ? LDAP_GET_LDERRNO( ld, NULL, NULL ) : LDAP_SUCCESS );
190 ldap_modify_s( LDAP *ld, const char *dn, LDAPMod **mods )
192 return( ldap_modify_ext_s( ld, dn, mods, NULL, NULL ));
197 ldap_modify_ext_s( LDAP *ld, const char *dn, LDAPMod **mods,
203 if (( err = ldap_modify_ext( ld, dn, mods, serverctrls, clientctrls,
208 if ( ldap_result( ld, msgid, 1, (struct timeval *)NULL, &res ) == -1 ) {
209 return( LDAP_GET_LDERRNO( ld, NULL, NULL ) );
212 return( ldap_result2error( ld, res, 1 ) );