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.
14 * globals.c - initialization code for global data
25 int ldap_syslog_level = LOG_DEBUG;
30 * Initialize the globals
32 Globals *init_globals()
36 g = ( Globals * ) malloc( sizeof( Globals ));
41 g->slapd_configfile = SLAPD_DEFAULT_CONFIGFILE;
42 g->no_work_interval = DEFAULT_NO_WORK_INTERVAL;
43 g->slurpd_shutdown = 0;
46 g->slurpd_rdir = DEFAULT_SLURPD_REPLICA_DIR;
47 strcpy( g->slurpd_status_file, DEFAULT_SLURPD_STATUS_FILE );
48 g->slapd_replogfile[ 0 ] = '\0';
49 g->slurpd_replogfile[ 0 ] = '\0';
50 g->slurpd_status_file[ 0 ] = '\0';
54 if ( St_init( &(g->st)) < 0 ) {
55 fprintf( stderr, "Cannot initialize status data\n" );
58 pthread_mutex_init( &(g->rej_mutex), pthread_mutexattr_default );
59 if ( Rq_init( &(g->rq)) < 0 ) {
60 fprintf( stderr, "Cannot initialize queue\n" );
64 g->default_srvtab = SRVTAB;
66 #if defined( THREAD_SUNOS4_LWP )
68 mon_create( &g->tsl_mon );
69 #endif /* THREAD_SUNOS4_LWP */