/* $OpenLDAP$ */
/*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include "portable.h"
#ifdef HAVE_NT_SERVICE_MANAGER
#define MAIN_RETURN(x) return
-struct sockaddr_in bind_addr;
+static struct sockaddr_in bind_addr;
void CommenceStartupProcessing( LPCTSTR serverName,
void(*stopper)(int));
#ifdef LOG_LOCAL4
int syslogUser = DEFAULT_SYSLOG_USER;
#endif
+
+ int g_argc = argc;
+ char **g_argv = argv;
#ifdef HAVE_NT_SERVICE_MANAGER
char *configfile = ".\\slapd.conf";
}
#endif
- g_argc = argc;
- g_argv = argv;
#ifdef HAVE_NT_SERVICE_MANAGER
{
if( serverName == NULL ) {
if ( (serverName = strrchr( argv[0], *LDAP_DIRSEP )) == NULL ) {
- serverName = ch_strdup( argv[0] );
+ serverName = argv[0];
} else {
- serverName = ch_strdup( serverName + 1 );
+ serverName = serverName + 1;
}
}
goto destroy;
}
- if ( schema_init( ) != 0 ) {
+ if ( slap_schema_init( ) != 0 ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
"main: schema initialization error\n" ));
goto destroy;
}
- if ( schema_prep( ) != 0 ) {
+ if ( glue_sub_init( ) != 0 ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ "main: subordinate config error\n"));
+#else
+ Debug( LDAP_DEBUG_ANY,
+ "subordinate config error\n",
+ 0, 0, 0 );
+#endif
+ goto destroy;
+ }
+
+ if ( slap_schema_check( ) != 0 ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
"main: schema prep error\n"));
ldap_pvt_tls_destroy();
#endif
+ config_destroy();
+
#ifdef CSRIMALLOC
mal_dumpleaktrace( leakfile );
#endif