]> git.sur5r.net Git - openldap/commitdiff
ITS#6453 cleanup on LDAP_TIMEOUT
authorHoward Chu <hyc@openldap.org>
Thu, 23 Dec 2010 23:18:41 +0000 (23:18 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 23 Dec 2010 23:18:41 +0000 (23:18 +0000)
libraries/libldap/search.c

index 65d55e477419d70bb3a4f49b65f38352ec9960cd..9bd71bb6163f7fbf1d334e2439592ade0018b894 100644 (file)
@@ -182,6 +182,11 @@ ldap_pvt_search_s(
 
        if( rc <= 0 ) {
                /* error(-1) or timeout(0) */
+               if ( ld->ld_errno == LDAP_TIMEOUT ) {
+                       /* cleanup request */
+                       (void) ldap_abandon( ld, msgid );
+                       ld->ld_errno = LDAP_TIMEOUT;
+               }
                return( ld->ld_errno );
        }