[Date Prev][Date Next] [Chronological] [Thread] [Top]

ldap_search_ext_s doesn't handle timeout (ITS#400)



Full_Name: Steven Sonntag
Version: development
OS: WinNT
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (137.65.214.133)


libraries/libldap/search.c v1.31

ldap_search_ext_s doesn't handle timeout correctly.

When a timeout occurs search results may be returned and the
ldap_errno is set to timeout.  The change checks errno for
LDAP_TIMEOUT and returns a timeout status if it is set.

diff follows:

--- ldap/libraries/libldap/search.c	Wed Sep 08 18:06:30 1999
+++ search.c	Tue Dec 14 23:45:55 1999
@@ -159,6 +170,10 @@
 
 	if ( ldap_result( ld, msgid, 1, timeout, res ) == -1 )
 		return( ld->ld_errno );
+
+	if ( ld->ld_errno == LDAP_TIMEOUT ) {
+		return LDAP_TIMEOUT;;
+	}
 
 	return( ldap_result2error( ld, *res, 0 ) );
 }