From: Pierangelo Masarati Date: Tue, 8 Sep 2009 07:56:43 +0000 (+0000) Subject: by now, make sure no timeout is used (ITS#6282) X-Git-Tag: ACLCHECK_0~224 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=393612b8e143f6a2e276de1a43a6545d889eb4ea;p=openldap by now, make sure no timeout is used (ITS#6282) --- diff --git a/servers/slapd/back-ldap/config.c b/servers/slapd/back-ldap/config.c index a725eec162..5bde983dd5 100644 --- a/servers/slapd/back-ldap/config.c +++ b/servers/slapd/back-ldap/config.c @@ -2086,7 +2086,10 @@ ldap_back_exop_whoami( retry: rs->sr_err = ldap_whoami( lc->lc_ld, ctrls, NULL, &msgid ); if ( rs->sr_err == LDAP_SUCCESS ) { - if ( ldap_result( lc->lc_ld, msgid, LDAP_MSG_ALL, NULL, &res ) == -1 ) { + /* by now, make sure no timeout is used (ITS#6282) */ + struct timeval tv; + tv.tv_sec = -1; + if ( ldap_result( lc->lc_ld, msgid, LDAP_MSG_ALL, &tv, &res ) == -1 ) { ldap_get_option( lc->lc_ld, LDAP_OPT_ERROR_NUMBER, &rs->sr_err ); if ( rs->sr_err == LDAP_SERVER_DOWN && doretry ) { diff --git a/servers/slapd/back-ldap/extended.c b/servers/slapd/back-ldap/extended.c index 2befcd5f11..88a5174ea4 100644 --- a/servers/slapd/back-ldap/extended.c +++ b/servers/slapd/back-ldap/extended.c @@ -190,7 +190,10 @@ retry: if ( rc == LDAP_SUCCESS ) { /* TODO: set timeout? */ - if ( ldap_result( lc->lc_ld, msgid, LDAP_MSG_ALL, NULL, &res ) == -1 ) { + /* by now, make sure no timeout is used (ITS#6282) */ + struct timeval tv; + tv.tv_sec = -1; + if ( ldap_result( lc->lc_ld, msgid, LDAP_MSG_ALL, &tv, &res ) == -1 ) { ldap_get_option( lc->lc_ld, LDAP_OPT_ERROR_NUMBER, &rc ); rs->sr_err = rc; @@ -316,7 +319,10 @@ retry: if ( rc == LDAP_SUCCESS ) { /* TODO: set timeout? */ - if ( ldap_result( lc->lc_ld, msgid, LDAP_MSG_ALL, NULL, &res ) == -1 ) { + /* by now, make sure no timeout is used (ITS#6282) */ + struct timeval tv; + tv.tv_sec = -1; + if ( ldap_result( lc->lc_ld, msgid, LDAP_MSG_ALL, &tv, &res ) == -1 ) { ldap_get_option( lc->lc_ld, LDAP_OPT_ERROR_NUMBER, &rc ); rs->sr_err = rc;