]> git.sur5r.net Git - openldap/commitdiff
make back-meta conform with man page
authorPierangelo Masarati <ando@openldap.org>
Sat, 14 Jan 2006 15:28:28 +0000 (15:28 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 14 Jan 2006 15:28:28 +0000 (15:28 +0000)
servers/slapd/back-meta/back-meta.h
servers/slapd/back-meta/bind.c

index a667e865671ed83155776987fc692c099c85f23a..5e2dbaf78ec45f63282645fbc3e885071f591040 100644 (file)
@@ -230,7 +230,7 @@ typedef struct metatarget_t {
        time_t                  mt_network_timeout;
        time_t                  mt_idle_timeout;
        struct timeval          mt_bind_timeout;
-#define META_BIND_TIMEOUT      10000
+#define META_BIND_TIMEOUT      LDAP_BACK_RESULT_UTIMEOUT
        time_t                  mt_timeout[ LDAP_BACK_OP_LAST ];
 } metatarget_t;
 
index 36e12ba0fc8c09d4ed33d7ae15a6f7d93b73e190..0540c23ec3796d88de70fb1c581c7d1153a3defd 100644 (file)
@@ -337,7 +337,7 @@ retry:;
                switch ( ldap_result( msc->msc_ld, msgid, LDAP_MSG_ALL, &tv, &res ) ) {
                case 0:
                        snprintf( buf, sizeof( buf ),
-                               "ldap_result=0 nretries=%d%s\n",
+                               "ldap_result=0 nretries=%d%s",
                                nretries, rebinding ? " rebinding" : "" );
                        Debug( LDAP_DEBUG_ANY,
                                "%s meta_back_single_bind[%d]: %s.\n",
@@ -351,6 +351,7 @@ retry:;
                                tv = mt->mt_bind_timeout;
                                goto retry;
                        }
+
                        rs->sr_err = LDAP_BUSY;
                        if ( rebinding ) {
                                ldap_abandon_ext( msc->msc_ld, msgid, NULL, NULL );
@@ -367,7 +368,7 @@ retry:;
 
                case -1:
                        ldap_get_option( msc->msc_ld, LDAP_OPT_ERROR_NUMBER,
-                                       &rs->sr_err );
+                               &rs->sr_err );
 
                        if ( rebinding ) {
                                ldap_abandon_ext( msc->msc_ld, msgid, NULL, NULL );
@@ -522,8 +523,8 @@ retry:;
                        /* fallthru */
 
                case -1:
-                       ldap_get_option( msc->msc_ld,
-                                       LDAP_OPT_ERROR_NUMBER, &rs->sr_err );
+                       ldap_get_option( msc->msc_ld, LDAP_OPT_ERROR_NUMBER,
+                               &rs->sr_err );
 
                        if ( rebinding ) {
                                ldap_abandon_ext( msc->msc_ld, msgid, NULL, NULL );