Commit e0bf8e89 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Fix build problems under NT... likely broken service manager code.

parent 203f1d28
...@@ -33,7 +33,7 @@ LIBLUTIL_F (SERVICE_STATUS_HANDLE) hSLAPDServiceStatus; ...@@ -33,7 +33,7 @@ LIBLUTIL_F (SERVICE_STATUS_HANDLE) hSLAPDServiceStatus;
extern ldap_pvt_thread_cond_t started_event, stopped_event; extern ldap_pvt_thread_cond_t started_event, stopped_event;
extern int is_NT_Service; extern int is_NT_Service;
void CommenceStartupProcessing( LPCTSTR serviceName, void CommenceStartupProcessing( LPCTSTR serverName,
void(*stopper)(int)); void(*stopper)(int));
void ReportSlapdShutdownComplete( void ); void ReportSlapdShutdownComplete( void );
void *getRegParam( char *svc, char *value ); void *getRegParam( char *svc, char *value );
...@@ -112,7 +112,7 @@ usage( char *name ) ...@@ -112,7 +112,7 @@ usage( char *name )
#ifdef LOG_LOCAL4 #ifdef LOG_LOCAL4
"\t-l sysloguser\tSyslog User (default: LOCAL4)\n" "\t-l sysloguser\tSyslog User (default: LOCAL4)\n"
#endif #endif
"\t-n serviceName\tservice name\n" "\t-n serverName\tservice name\n"
"\t-s level\tSyslog Level\n" "\t-s level\tSyslog Level\n"
#ifdef SLAPD_BDB2 #ifdef SLAPD_BDB2
"\t-t\t\tEnable BDB2 timing\n" "\t-t\t\tEnable BDB2 timing\n"
...@@ -169,10 +169,10 @@ int main( int argc, char **argv ) ...@@ -169,10 +169,10 @@ int main( int argc, char **argv )
char *regService = NULL; char *regService = NULL;
if ( is_NT_Service ) { if ( is_NT_Service ) {
NTservice = argv[0]; serverName = argv[0];
CommenceStartupProcessing( NTservice, slap_sig_shutdown ); CommenceStartupProcessing( serverName, slap_sig_shutdown );
if ( strcmp(NTservice, SERVICE_NAME) ) if ( strcmp(serverName, SERVICE_NAME) )
regService = NTservice; regService = serverName;
} }
i = (int*)getRegParam( regService, "DebugLevel" ); i = (int*)getRegParam( regService, "DebugLevel" );
...@@ -443,7 +443,7 @@ int main( int argc, char **argv ) ...@@ -443,7 +443,7 @@ int main( int argc, char **argv )
#ifdef HAVE_NT_EVENT_LOG #ifdef HAVE_NT_EVENT_LOG
if (is_NT_Service) if (is_NT_Service)
LogSlapdStartedEvent( NTservice, slap_debug, configfile, urls ); LogSlapdStartedEvent( serverName, slap_debug, configfile, urls );
#endif #endif
rc = slapd_daemon(); rc = slapd_daemon();
...@@ -471,7 +471,7 @@ destroy: ...@@ -471,7 +471,7 @@ destroy:
stop: stop:
#ifdef HAVE_NT_EVENT_LOG #ifdef HAVE_NT_EVENT_LOG
if (is_NT_Service) if (is_NT_Service)
LogSlapdStoppedEvent( NTservice ); LogSlapdStoppedEvent( serverName );
#endif #endif
Debug( LDAP_DEBUG_ANY, "slapd stopped.\n", 0, 0, 0 ); Debug( LDAP_DEBUG_ANY, "slapd stopped.\n", 0, 0, 0 );
......
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