X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-ldap%2Fextended.c;h=293e24e0a8aae1b54649b656a72dc479d2eedece;hb=c7305c4133eca44f2cf10f8b5f11dcfc0c1ff98b;hp=57379b8dfab01826ba635058218aa2febe0ee824;hpb=ebb9e029a79638915ada85f8892609e6369380ed;p=openldap diff --git a/servers/slapd/back-ldap/extended.c b/servers/slapd/back-ldap/extended.c index 57379b8dfa..293e24e0a8 100644 --- a/servers/slapd/back-ldap/extended.c +++ b/servers/slapd/back-ldap/extended.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 2003-2007 The OpenLDAP Foundation. + * Copyright 2003-2010 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -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;