]> git.sur5r.net Git - openldap/commitdiff
need some minimal timeout otherwise strange issues occur
authorPierangelo Masarati <ando@openldap.org>
Mon, 22 Aug 2005 18:14:41 +0000 (18:14 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 22 Aug 2005 18:14:41 +0000 (18:14 +0000)
servers/slapd/back-ldap/bind.c
servers/slapd/back-ldap/search.c
servers/slapd/back-meta/bind.c

index 7ce02eda4cb8fee237dd06753dcef948d70fa047..5f6960abed0ecc9f2af8f189ba1bb368a8acc67b 100644 (file)
@@ -286,7 +286,7 @@ ldap_back_start_tls(
                if ( rc == LDAP_SUCCESS ) {
                        LDAPMessage     *res = NULL;
                        int             retries = 1;
-                       struct timeval  tv = { 0, 0 };
+                       struct timeval  tv = { 0, 100000 };
 
 retry:;
                        rc = ldap_result( ld, msgid, LDAP_MSG_ALL, &tv, &res );
@@ -811,7 +811,7 @@ ldap_back_op_result(
         * remote server response */
        if ( ERR_OK( rs->sr_err ) ) {
                int             rc;
-               struct timeval  tv = { 0, 0 };
+               struct timeval  tv = { 0, 100000 };
 
 retry:;
                /* if result parsing fails, note the failure reason */
index e06cb8bb42ee53754c94810438faf775554d4bd2..09ad79807e647dd5a62fedcc306747acb3b7da50 100644 (file)
@@ -179,6 +179,7 @@ ldap_back_search(
 
        } else {
                tv.tv_sec = 0;
+               tv.tv_usec = 100000;
        }
 
        if ( op->ors_attrs ) {
index e211f6363128ac86f7ef1233d2db2115b5b8ef85..4ec1e2853623cc309451e45df15684d07d717714 100644 (file)
@@ -211,7 +211,7 @@ rebind:;
                        op->o_ctrls, NULL, &msgid );
        if ( rs->sr_err == LDAP_SUCCESS ) {
                LDAPMessage     *res;
-               struct timeval  tv;
+               struct timeval  tv = { 0, 100000 };
                int             rc;
                int             nretries = mt->mt_nretries;
 
@@ -234,6 +234,8 @@ retry:;
                                if ( nretries > 0 ) {
                                        nretries--;
                                }
+                               tv.tv_sec = 0;
+                               tv.tv_usec = 100000;
                                goto retry;
                        }
                        rs->sr_err = LDAP_BUSY;
@@ -380,7 +382,7 @@ rebind:;
                        NULL, NULL, &msgid );
        if ( rc == LDAP_SUCCESS ) {
                LDAPMessage     *res;
-               struct timeval  tv;
+               struct timeval  tv = { 0, 100000 };
 
                /*
                 * handle response!!!
@@ -401,6 +403,8 @@ retry:;
                                if ( nretries > 0 ) {
                                        nretries--;
                                }
+                               tv.tv_sec = 0;
+                               tv.tv_usec = 100000;
                                goto retry;
                        }