Formatting.
[nssm.git] / service.cpp
index aee0a67..a86d744 100644 (file)
@@ -1213,7 +1213,7 @@ int control_service(unsigned long control, int argc, TCHAR **argv) {
     }\r
     else {\r
       CloseHandle(service_handle);\r
-      _ftprintf(stderr, _T("%s: %s %s"), canonical_name, service_control_text(control), error_string(error));\r
+      _ftprintf(stderr, _T("%s: %s: %s"), canonical_name, service_control_text(control), error_string(error));\r
       return 1;\r
     }\r
   }\r
@@ -1473,8 +1473,8 @@ unsigned long WINAPI service_control_handler(unsigned long control, unsigned lon
 \r
     case NSSM_SERVICE_CONTROL_ROTATE:\r
       log_service_control(service->name, control, true);\r
-      if (service->rotate_stdout_online) service->rotate_stdout_online = NSSM_ROTATE_ONLINE_ASAP;\r
-      if (service->rotate_stdout_online) service->rotate_stderr_online = NSSM_ROTATE_ONLINE_ASAP;\r
+      if (service->rotate_stdout_online == NSSM_ROTATE_ONLINE) service->rotate_stdout_online = NSSM_ROTATE_ONLINE_ASAP;\r
+      if (service->rotate_stderr_online == NSSM_ROTATE_ONLINE) service->rotate_stderr_online = NSSM_ROTATE_ONLINE_ASAP;\r
       return NO_ERROR;\r
   }\r
 \r
@@ -1539,7 +1539,7 @@ int start_service(nssm_service_t *service) {
 \r
   if (get_process_creation_time(service->process_handle, &service->creation_time)) ZeroMemory(&service->creation_time, sizeof(service->creation_time));\r
 \r
-  close_output_handles(&si, ! service->rotate_stdout_online, ! service->rotate_stderr_online);\r
+  close_output_handles(&si);\r
 \r
   if (service->affinity) {\r
     /*\r