]> git.sur5r.net Git - openldap/commitdiff
Revert prev commit, not necessary
authorHoward Chu <hyc@openldap.org>
Thu, 25 Dec 2003 14:56:02 +0000 (14:56 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 25 Dec 2003 14:56:02 +0000 (14:56 +0000)
servers/slurpd/fm.c
servers/slurpd/rq.c

index cd8a5d7188fa85c4322252d5cac47af8e7b358f9..35352e7d1f411b0987a7e59320a418b6168f51cd 100644 (file)
@@ -217,7 +217,6 @@ populate_queue(
 {
     FILE       *fp, *lfp;
     char       *p;
-    int                wake = 0;
 
     if ( acquire_lock( f, &fp, &lfp ) < 0 ) {
 #ifdef NEW_LOGGING
@@ -263,16 +262,10 @@ populate_queue(
                    "error: malformed replog entry (begins with \"%s\")\n",
                    p, 0, 0 );
 #endif
-       } else {
-           wake = 1;
        }
        free( p );
        ldap_pvt_thread_yield();
     }
-    /* wake up any threads waiting for more work */
-    if ( wake ) {
-        ldap_pvt_thread_cond_broadcast( &sglob->rq->rq_more );
-    }
     sglob->srpos = ftell( fp );
     }
     (void) relinquish_lock( f, fp, lfp );
index dad5e6c617e6988373ef0701a8e02cacb0c43700..9a84bfce2f6c911eccfcda8046e4b5699410bdc2 100644 (file)
@@ -197,27 +197,10 @@ Rq_add(
        rq->rq_head = re;
        rq->rq_tail = re;
        wasempty = 1;
-    } else if ( re->re_timestamp > rq->rq_tail->re_timestamp ||
-               ( re->re_timestamp == rq->rq_tail->re_timestamp &&
-                 re->re_seq > rq->rq_tail->re_seq )) {
-       rq->rq_tail->re_next = re;
-       rq->rq_tail = re;
     } else {
-       Re *p, *r;
-
-       for (r = rq->rq_head, p = NULL; r->re_timestamp < re->re_timestamp ||
-           (r->re_timestamp == re->re_timestamp && r->re_seq < re->re_seq);
-           p = r, r = r->re_next );
-       if ( !p ) {
-           re->re_next = rq->rq_head;
-           rq->rq_head = re;
-       } else {
-           re->re_next = p->re_next;
-           p->re_next = re;
-       }
+       rq->rq_tail->re_next = re;
     }
 
-#if 0
     /* set the sequence number */
     re->re_seq = 0;
     if ( !wasempty && ( rq->rq_tail->re_timestamp == re->re_timestamp )) {
@@ -228,14 +211,11 @@ Rq_add(
        re->re_seq = rq->rq_tail->re_seq + 1;
     }
     rq->rq_tail = re;
-#endif
 
     /* Increment count of items in queue */
     rq->rq_nre++;
-#if 0
     /* wake up any threads waiting for more work */
     ldap_pvt_thread_cond_broadcast( &rq->rq_more );
-#endif
 
     /* ... and unlock the queue */
     rq->rq_unlock( rq );