#ifdef HAVE_WINSOCK
if( log_file == NULL )
{
- log_file = fopen( LDAP_RUNDIR LDAP_DIRSEP "slapd.log", "w" );
+ log_file = fopen( LDAP_RUNDIR LDAP_DIRSEP "openldap.log", "w" );
if ( log_file == NULL )
- log_file = fopen( "slapd.log", "w" );
+ log_file = fopen( "openldap.log", "w" );
if ( log_file == NULL )
return;
-// ntservice.c
+/* ntservice.c */
#include "portable.h"
+
+#include <ac/stdlib.h>
+#include <ac/string.h>
+
#include <stdio.h>
+
#include <windows.h>
+#include <winsvc.h>
+
#include "ldap.h"
+
+#define ldap_debug slap_debug
+extern int slap_debug;
+
#include "ldap_log.h"
#include "ldap_pvt_thread.h"
-#include <winsvc.h>
-#include <sys/types.h>
-#include <ac/string.h>
+
#include "ldap_defaults.h"
void (*stopfunc)(int);
-/* in main.c */
-void WINAPI ServiceMain( DWORD argc, LPTSTR *argv );
-
-
-/* in wsa_err.c */
-char *WSAGetLastErrorString( void );
-
/* in nt_err.c */
char *GetLastErrorString( void );
SetServiceStatus(hSLAPDServiceStatus, &SLAPDServiceStatus);
break;
case WAIT_FAILED:
- /* theres been some proble with WaitForSingleObject so tell the Service
+ /* theres been some problem with WaitForSingleObject so tell the Service
* Control Manager to wait 30 seconds before deploying its assasin and
* then leave the thread. */
SLAPDServiceStatus.dwCheckPoint++;
SetServiceStatus(hSLAPDServiceStatus, &SLAPDServiceStatus);
break;
case WAIT_FAILED:
- /* theres been some proble with WaitForSingleObject so tell the Service
+ /* theres been some problem with WaitForSingleObject so tell the Service
* Control Manager to wait 30 seconds before deploying its assasin and
* then leave the thread. */
SLAPDServiceStatus.dwCheckPoint++;
case SERVICE_CONTROL_STOP:
case SERVICE_CONTROL_SHUTDOWN:
- Debug( LDAP_DEBUG_TRACE, "Service Shutdown ordered\n", 0, 0 );
+ Debug( LDAP_DEBUG_TRACE, "Service Shutdown ordered\n", 0, 0, 0 );
SLAPDServiceStatus.dwCurrentState = SERVICE_STOP_PENDING;
SLAPDServiceStatus.dwCheckPoint++;
SLAPDServiceStatus.dwWaitHint = SCM_NOTIFICATION_INTERVAL * 2;