From: Howard Chu Date: Thu, 20 Dec 2007 02:46:13 +0000 (+0000) Subject: ITS#5291, more for rev 1.79 search timeouts X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~290 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8ddc2dd7739616ebd6c383e8512af52510e1b3b7;p=openldap ITS#5291, more for rev 1.79 search timeouts --- diff --git a/libraries/libldap/search.c b/libraries/libldap/search.c index 2f27eddd6e..7c6f62b977 100644 --- a/libraries/libldap/search.c +++ b/libraries/libldap/search.c @@ -358,7 +358,7 @@ ldap_search_st( == -1 ) return( ld->ld_errno ); - if ( ldap_result( ld, msgid, LDAP_MSG_ALL, timeout, res ) == -1 ) + if ( ldap_result( ld, msgid, LDAP_MSG_ALL, timeout, res ) == -1 || !*res ) return( ld->ld_errno ); if ( ld->ld_errno == LDAP_TIMEOUT ) { @@ -386,7 +386,7 @@ ldap_search_s( == -1 ) return( ld->ld_errno ); - if ( ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *) NULL, res ) == -1 || !res ) + if ( ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *) NULL, res ) == -1 || !*res ) return( ld->ld_errno ); return( ldap_result2error( ld, *res, 0 ) );