Commit 5b508b89 authored by Randy Kunkee's avatar Randy Kunkee
Browse files

Make slurpd work when restarting in one-shot mode.

parent cc0cb627
......@@ -101,15 +101,8 @@ main(
#endif /* LDAP_DEBUG */
lutil_detach( 0, 0 );
/* initialize thread package */
ldap_pvt_thread_initialize();
/*
* Start threads - one thread for each replica
*/
for ( i = 0; sglob->replicas[ i ] != NULL; i++ ) {
start_replica_thread( sglob->replicas[ i ]);
}
/* initialize thread package */
ldap_pvt_thread_initialize();
/*
* Start the main file manager thread (in fm.c).
......@@ -123,10 +116,26 @@ main(
}
/*
* wait for fm to finish if in oneshot mode
*/
if ( sglob->one_shot_mode ) {
ldap_pvt_thread_join( sglob->fm_tid, (void *) NULL );
}
/*
* Start threads - one thread for each replica
*/
for ( i = 0; sglob->replicas[ i ] != NULL; i++ ) {
start_replica_thread( sglob->replicas[ i ]);
}
/*
* Wait for the fm thread to finish.
*/
ldap_pvt_thread_join( sglob->fm_tid, (void *) NULL );
if ( !sglob->one_shot_mode ) {
ldap_pvt_thread_join( sglob->fm_tid, (void *) NULL );
}
/*
* Wait for the replica threads to finish.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment