You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2021/11/10 13:47:51 UTC
[commons-daemon] 02/02: Display service status name along the code.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
commit f5cbc309e19ab641968b4db8ba381f8628dd69dc
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Nov 10 08:47:47 2021 -0500
Display service status name along the code.
---
src/native/windows/src/service.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/native/windows/src/service.c b/src/native/windows/src/service.c
index e7bde88..acc73fa 100644
--- a/src/native/windows/src/service.c
+++ b/src/native/windows/src/service.c
@@ -487,9 +487,11 @@ apxServiceControl(APXHANDLE hService, DWORD dwControl, UINT uMsg,
}
if (!dwPendingState && !dwState) {
apxLogWrite(APXLOG_MARK_ERROR
- "apxServiceControl(): !dwPendingState(%d) && !dwState(%d); returning FALSE",
+ "apxServiceControl(): !dwPendingState(%d = %s) && !dwState(%d = %s); returning FALSE",
dwPendingState,
- dwState);
+ apxServiceGetStateName(dwPendingState),
+ dwState,
+ apxServiceGetStateName(dwState));
return FALSE;
}
/* Now lets control */
@@ -574,10 +576,12 @@ apxServiceControl(APXHANDLE hService, DWORD dwControl, UINT uMsg,
return TRUE;
} else {
apxLogWrite(APXLOG_MARK_ERROR
- "apxServiceControl(): dwState(%d) != dwCurrentState(%d); "
+ "apxServiceControl(): dwState(%d = %s) != dwCurrentState(%d = %s); "
"dwWin32ExitCode = %d, dwWaitHint = %d, dwServiceSpecificExitCode = %d",
dwState,
+ apxServiceGetStateName(dwState),
stStatus.dwCurrentState,
+ apxServiceGetStateName(stStatus.dwCurrentState),
stStatus.dwWin32ExitCode,
stStatus.dwWaitHint,
stStatus.dwServiceSpecificExitCode);