]> git.sur5r.net Git - openldap/commitdiff
ITS#798: Fix one-shot mode with empty file
authorKurt Zeilenga <kurt@openldap.org>
Tue, 3 Oct 2000 19:22:49 +0000 (19:22 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 3 Oct 2000 19:22:49 +0000 (19:22 +0000)
CHANGES
servers/slurpd/ri.c

diff --git a/CHANGES b/CHANGES
index 10aa0b381be4a03efdc9eaa19c95b3c7099fc278..67d94cae4c08147292c60cfa1794715b422d31d3 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,7 @@ OpenLDAP 2.0.X Engineering
        Fixed slapd idletimeout lock bug (ITS#767)
        Fixed slapd caseIgnoreIA5string indexing bug (ITS#786)
        Fixed slurpd TLS initialization bug (ITS#768)
+       Fixed slurpd empty one shot hang (ITS#798)
        Fixed -lldap SASL ctx close bug (ITS#790)
        Fixed -lldap first/next attribute bug (ITS#778)
        Fixed -lldap (v2) rebind URL bug
index 9ea1a2217420c1c489f24e0c388def41bdb39905..f22da316265c2d6e284f0b16ff01dd0abb0379fc 100644 (file)
@@ -62,7 +62,13 @@ Ri_process(
     rq->rq_lock( rq );
     while ( !sglob->slurpd_shutdown &&
            (( re = rq->rq_gethead( rq )) == NULL )) {
-       /* No work - wait on condition variable */
+       /* No work */
+       if ( sglob->one_shot_mode ) {
+           /* give up if in one shot mode */
+           rq->rq_unlock( rq );
+           return 0;
+       }
+       /* wait on condition variable */
        ldap_pvt_thread_cond_wait( &rq->rq_more, &rq->rq_mutex );
     }