From: Kurt Zeilenga Date: Mon, 21 Jun 1999 22:59:23 +0000 (+0000) Subject: Add debug to nt project, remove lint. X-Git-Tag: OPENLDAP_REL_ENG_2_BP~248 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=61c5f7a2cac6c5d7f2c8b20a53c9a62d0571a33d;p=openldap Add debug to nt project, remove lint. --- diff --git a/libraries/liblutil/debug.c b/libraries/liblutil/debug.c index 3958d3e8c5..a46cba150c 100644 --- a/libraries/liblutil/debug.c +++ b/libraries/liblutil/debug.c @@ -45,10 +45,10 @@ void (lutil_debug)( int level, int debug, const char *fmt, ... ) #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; diff --git a/libraries/liblutil/liblutil.dsp b/libraries/liblutil/liblutil.dsp index 3b4e38ac5c..4ccd716d13 100644 --- a/libraries/liblutil/liblutil.dsp +++ b/libraries/liblutil/liblutil.dsp @@ -132,6 +132,10 @@ SOURCE=..\..\include\ac\bytes.h # End Source File # Begin Source File +SOURCE=.\debug.c +# End Source File +# Begin Source File + SOURCE="..\..\include\getopt-compat.h" # End Source File # Begin Source File diff --git a/libraries/liblutil/nt_err.c b/libraries/liblutil/nt_err.c index 2416f997e5..a45d74e29b 100644 --- a/libraries/liblutil/nt_err.c +++ b/libraries/liblutil/nt_err.c @@ -1,8 +1,6 @@ #include #include -#define __RETSTR( x ) case x: return #x; - char *GetErrorString( int err ) { static char msgBuf[1024]; diff --git a/libraries/liblutil/ntservice.c b/libraries/liblutil/ntservice.c index 5b1acddd12..5672dedc12 100644 --- a/libraries/liblutil/ntservice.c +++ b/libraries/liblutil/ntservice.c @@ -1,13 +1,22 @@ -// ntservice.c +/* ntservice.c */ #include "portable.h" + +#include +#include + #include + #include +#include + #include "ldap.h" + +#define ldap_debug slap_debug +extern int slap_debug; + #include "ldap_log.h" #include "ldap_pvt_thread.h" -#include -#include -#include + #include "ldap_defaults.h" @@ -27,13 +36,6 @@ ldap_pvt_thread_t start_status_tid, stop_status_tid; 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 ); @@ -167,7 +169,7 @@ static void *start_status_routine( void *ptr ) 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++; @@ -209,7 +211,7 @@ static void *stop_status_routine( void *ptr ) 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++; @@ -232,7 +234,7 @@ void WINAPI SLAPDServiceCtrlHandler( IN DWORD Opcode) 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;