]> git.sur5r.net Git - openldap/commitdiff
Sync with HEAD
authorKurt Zeilenga <kurt@openldap.org>
Tue, 11 Oct 2005 19:42:18 +0000 (19:42 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 11 Oct 2005 19:42:18 +0000 (19:42 +0000)
libraries/libldap/os-ip.c
servers/slapd/config.c
servers/slapd/overlays/accesslog.c
servers/slapd/overlays/unique.c
servers/slapd/syncrepl.c

index 02eb7828aa55cd73c98f109681fbe636a5268f37..65341b5e846d3f82d0c943bc94dbfb33b14be771 100644 (file)
@@ -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 );
        }
index 8d44c6c60e6295bffae06f8d941bd248f79b9104..8d5544183def6690f1005d663978c4607d4d98b2 100644 (file)
@@ -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:
index 88500027f888fbe35b307330f6a0238f6edad991..6ef157277e92dca0fd0c444678e7e56e57fe4dcd 100644 (file)
@@ -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 );
 
index f80a1c35fed9e3285a9c7f2d1f7c15a2fba856ba..d1df4dbb3ea234acc71bd6bafd7cf6b16cc9c827 100644 (file)
@@ -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,
index f812d5d4aaf67a712da7565a34c4b7c704c5324a..59ba0302aac60baa8dfb41c934cc63b0f4953e62 100644 (file)
 
 #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;