2 * Copyright (c) 1996 Regents of the University of Michigan.
5 * Redistribution and use in source and binary forms are permitted
6 * provided that this notice is preserved and that due credit is given
7 * to the University of Michigan at Ann Arbor. The name of the University
8 * may not be used to endorse or promote products derived from this
9 * software without specific prior written permission. This software
10 * is provided ``as is'' without express or implied warranty.
15 * replica.c - code to start up replica threads.
27 * Just invoke the Ri's process() member function, and log the start and
35 Ri *ri = (Ri *) ri_arg;
37 Debug( LDAP_DEBUG_ARGS, "begin replication thread for %s:%d\n",
38 ((Ri *)ri)->ri_hostname, ((Ri *)ri)->ri_port, 0 );
42 Debug( LDAP_DEBUG_ARGS, "end replication thread for %s:%d\n",
43 ri->ri_hostname, ri->ri_port, 0 );
50 * Start a detached thread for the given replica.
57 /* POSIX_THREADS or compatible */
58 if ( ldap_pvt_thread_create( &(ri->ri_tid), 0, replicate,
59 (void *) ri ) != 0 ) {
60 Debug( LDAP_DEBUG_ANY, "replica \"%s:%d\" ldap_pvt_thread_create failed\n",
61 ri->ri_hostname, ri->ri_port, 0 );