3 * Copyright (c) 1996 Regents of the University of Michigan.
6 * Redistribution and use in source and binary forms are permitted
7 * provided that this notice is preserved and that due credit is given
8 * to the University of Michigan at Ann Arbor. The name of the University
9 * may not be used to endorse or promote products derived from this
10 * software without specific prior written permission. This software
11 * is provided ``as is'' without express or implied warranty.
15 * globals.c - initialization code for global data
22 #include <ac/stdlib.h>
23 #include <ac/string.h>
31 int ldap_syslog_level = LOG_DEBUG;
36 * Initialize the globals
43 g = ( Globals * ) malloc( sizeof( Globals ));
48 g->slapd_configfile = SLAPD_DEFAULT_CONFIGFILE;
49 g->no_work_interval = DEFAULT_NO_WORK_INTERVAL;
50 g->slurpd_shutdown = 0;
53 g->slurpd_rdir = DEFAULT_SLURPD_REPLICA_DIR "/replica";
54 strcpy( g->slurpd_status_file, DEFAULT_SLURPD_STATUS_FILE );
55 g->slapd_replogfile[ 0 ] = '\0';
56 g->slurpd_replogfile[ 0 ] = '\0';
57 g->slurpd_status_file[ 0 ] = '\0';
62 if ( St_init( &(g->st)) < 0 ) {
63 fprintf( stderr, "Cannot initialize status data\n" );
66 ldap_pvt_thread_mutex_init( &(g->rej_mutex) );
67 if ( Rq_init( &(g->rq)) < 0 ) {
68 fprintf( stderr, "Cannot initialize queue\n" );
71 #ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
72 g->default_srvtab = SRVTAB;
73 #endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND */