]> git.sur5r.net Git - openldap/commitdiff
Add debug to nt project, remove lint.
authorKurt Zeilenga <kurt@openldap.org>
Mon, 21 Jun 1999 22:59:23 +0000 (22:59 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 21 Jun 1999 22:59:23 +0000 (22:59 +0000)
libraries/liblutil/debug.c
libraries/liblutil/liblutil.dsp
libraries/liblutil/nt_err.c
libraries/liblutil/ntservice.c

index 3958d3e8c5483051632568d37c5b13fa47cdaa91..a46cba150cd916f6c2b404ce95905d0715fef5be 100644 (file)
@@ -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;
index 3b4e38ac5c7e146f1cb7ad14a65ac6f324402118..4ccd716d13ea52f6a828d0680086af062d917fe5 100644 (file)
@@ -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
index 2416f997e5746f8f7c26ffeb32f46d4ff143ff1d..a45d74e29b38dc39f0c1bbd5dd5b468a8bccbf00 100644 (file)
@@ -1,8 +1,6 @@
 #include <windows.h>
 #include <winerror.h>
 
-#define __RETSTR( x ) case x: return #x;
-
 char *GetErrorString( int err )
 {
        static char msgBuf[1024];
index 5b1acddd127f0a89291d6c2b5fad8773abc6d562..5672dedc120b93619cadfefa40adb16e8f760285 100644 (file)
@@ -1,13 +1,22 @@
-// 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"
 
@@ -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;