/* $OpenLDAP$ */
+/*
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
/*
* Copyright (c) 1996 Regents of the University of Michigan.
* All rights reserved.
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 );
}
Re *re
)
{
- int x;
+ long x;
int ret;
/* Lock the St struct to avoid a race */
sglob->st->st_lock( sglob->st );
- x = strcmp( re->re_timestamp, ri->ri_stel->last );
+ x = re->re_timestamp - ri->ri_stel->last;
if ( x > 0 ) {
/* re timestamp is newer */
ret = 1;