]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9745 more for prev commit
authorHoward Chu <hyc@openldap.org>
Tue, 16 Nov 2021 23:37:54 +0000 (23:37 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 16 Nov 2021 23:37:54 +0000 (23:37 +0000)
servers/lloadd/main.c

index 13ff4a3808a81b296a1af27cdb16a0d8a6cec65e..6ec70c12b4cd15b1e85d9d433d01bc0af4bdf433 100644 (file)
@@ -94,6 +94,10 @@ struct signal_handler {
         { 0, NULL }
 };
 
+/* in logging.c */
+extern char *serverName;
+extern int slap_debug_orig;
+
 /*
  * when more than one lloadd is running on one machine, each one might have
  * it's own LOCAL for syslogging and must have its own pid/args files
@@ -367,7 +371,6 @@ main( int argc, char **argv )
 
     char *configfile = NULL;
     char *configdir = NULL;
-    char *serverName;
     int serverMode = SLAP_SERVER_MODE;
 
     char **debug_unknowns = NULL;
@@ -601,6 +604,7 @@ unhandled_option:;
     ber_set_option( NULL, LBER_OPT_DEBUG_LEVEL, &slap_debug );
     ldap_set_option( NULL, LDAP_OPT_DEBUG_LEVEL, &slap_debug );
     ldif_debug = slap_debug;
+       slap_debug_orig = slap_debug;
 
     if ( version ) {
         fprintf( stderr, "%s\n", Versionstr );
@@ -833,7 +837,7 @@ unhandled_option:;
 
 #ifndef HAVE_WINSOCK
     if ( !no_detach ) {
-        write( waitfds[1], "1", 1 );
+        (void)!write( waitfds[1], "1", 1 );
         close( waitfds[1] );
     }
 #endif