osip_debug(ld, "ldap_connect_timeout: fd: %d tm: %ld async: %d\n",
s, opt_tv ? tv.tv_sec : -1L, async);
- if ( ldap_pvt_ndelay_on(ld, s) == -1 )
+ if ( opt_tv && ldap_pvt_ndelay_on(ld, s) == -1 )
return ( -1 );
if ( connect(s, sin, addrlen) != AC_SOCKET_ERROR ) {
- if ( ldap_pvt_ndelay_off(ld, s) == -1 )
+ if ( opt_tv && ldap_pvt_ndelay_off(ld, s) == -1 )
return ( -1 );
return ( 0 );
}
int j;
iarg = 0; larg = 0; barg = 0;
switch(arg_type & ARGS_NUMERIC) {
- case ARG_INT: iarg = atoi(c->argv[1]); break;
+ case ARG_INT: iarg = strtol(c->argv[1], NULL, 0); break;
case ARG_LONG: larg = strtol(c->argv[1], NULL, 0); break;
case ARG_BER_LEN_T: barg = (ber_len_t)atol(c->argv[1]); break;
case ARG_ON_OFF:
op->o_tmpmemctx );
strcpy( nrdn.bv_val + STRLENOF(RDNEQ), ntimestamp.bv_val );
- nrdn.bv_len += ntimestamp.bv_len;
+ nrdn.bv_len = STRLENOF(RDNEQ)+ntimestamp.bv_len;
build_new_dn( &e->e_name, li->li_db->be_suffix, &rdn, NULL );
build_new_dn( &e->e_nname, li->li_db->be_nsuffix, &nrdn, NULL );
op->o_req_dn.bv_val, op->orr_newrdn.bv_val, 0);
if ( !dnIsSuffix( &op->o_req_ndn, &ud->dn ) &&
- (!op->orr_nnewSup || !dnIsSuffix( &op->orr_nnewSup, &ud->dn )))
+ (!op->orr_nnewSup || !dnIsSuffix( op->orr_nnewSup, &ud->dn )))
return SLAP_CB_CONTINUE;
if(ldap_bv2rdn_x(&op->oq_modrdn.rs_newrdn, &newrdn,
#include "ldap_rq.h"
-/* FIXME: for ldap_ld_free() */
-#undef ldap_debug
-#include "../../libraries/libldap/ldap-int.h"
-
struct nonpresent_entry {
struct berval *npe_name;
struct berval *npe_nname;
avl_free( sie->si_presentlist, avl_ber_bvfree );
}
if ( sie->si_ld ) {
- ldap_ld_free( sie->si_ld, 1, NULL, NULL );
+ ldap_unbind_ext( sie->si_ld, NULL, NULL );
}
while ( !LDAP_LIST_EMPTY( &sie->si_nonpresentlist )) {
struct nonpresent_entry* npe;