[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: slurpd in one shot mode, empty replog file (ITS#798)
Sure. The patch is only 3 lines of code.
Here is the first few lines of the Ri_process function. The new code is commented at the beginning and at the end with //AFW
I don't know how this is normally managed (this process) but anyway, heres the code (nothing changed till we get to the //AFW stuff)
static int
Ri_process(
Ri *ri
)
{
Rq *rq = sglob->rq;
Re *re, *new_re;
int rc ;
char *errmsg;
(void) SIGNAL( LDAP_SIGUSR1, do_nothing );
(void) SIGNAL( SIGPIPE, SIG_IGN );
if ( ri == NULL ) {
Debug( LDAP_DEBUG_ANY, "Error: Ri_process: ri == NULL!\n", 0, 0, 0 );
return -1;
}
/*
* Startup code. See if there's any work to do. If not, wait on the
* rq->rq_more condition variable.
*/
rq->rq_lock( rq );
while ( !sglob->slurpd_shutdown &&
(( re = rq->rq_gethead( rq )) == NULL )) {
//AFW, start new code ...
if ( sglob->one_shot_mode ) {
rq->rq_unlock( rq );
return 0;
}//AFW end new code ..
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at http://profiles.msn.com.