From: Kurt Zeilenga Date: Tue, 11 Oct 2005 19:42:18 +0000 (+0000) Subject: Sync with HEAD X-Git-Tag: OPENLDAP_REL_ENG_2_3_11~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=69a1f5b1b7772956656faced777564734f661105;p=openldap Sync with HEAD --- diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index 02eb7828aa..65341b5e84 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -232,11 +232,11 @@ ldap_pvt_connect(LDAP *ld, ber_socket_t s, 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 ); } diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 8d44c6c60e..8d5544183d 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -191,7 +191,7 @@ int config_check_vals(ConfigTable *Conf, ConfigArgs *c, int check_only ) { 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: diff --git a/servers/slapd/overlays/accesslog.c b/servers/slapd/overlays/accesslog.c index 88500027f8..6ef157277e 100644 --- a/servers/slapd/overlays/accesslog.c +++ b/servers/slapd/overlays/accesslog.c @@ -679,7 +679,7 @@ static Entry *accesslog_entry( Operation *op, int logop ) { 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 ); diff --git a/servers/slapd/overlays/unique.c b/servers/slapd/overlays/unique.c index f80a1c35fe..d1df4dbb3e 100644 --- a/servers/slapd/overlays/unique.c +++ b/servers/slapd/overlays/unique.c @@ -490,7 +490,7 @@ static int unique_modrdn( 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, diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index f812d5d4aa..59ba0302aa 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -31,10 +31,6 @@ #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; @@ -2497,7 +2493,7 @@ syncinfo_free( syncinfo_t *sie ) 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;