diff mbox

[ovs-dev] windows: Set service status when stop is issued

Message ID 20170519212333.12492-1-aserdean@cloudbasesolutions.com
State Accepted
Headers show

Commit Message

Alin Serdean May 19, 2017, 9:23 p.m. UTC
If the service manager issued a stop service, the control handler
registered by the running daemon should report that service changed
state.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
---
 lib/daemon-windows.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ben Pfaff May 31, 2017, 11:24 p.m. UTC | #1
On Fri, May 19, 2017 at 09:23:47PM +0000, Alin Serdean wrote:
> If the service manager issued a stop service, the control handler
> registered by the running daemon should report that service changed
> state.
> 
> Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>

Seems reasonable, thanks!  I applied this to master.

Please let me know if I should backport this.
diff mbox

Patch

diff --git a/lib/daemon-windows.c b/lib/daemon-windows.c
index 4fc97a8..bed738f 100644
--- a/lib/daemon-windows.c
+++ b/lib/daemon-windows.c
@@ -196,6 +196,7 @@  control_handler(DWORD request)
         service_status.dwCurrentState = SERVICE_STOPPED;
         service_status.dwWin32ExitCode = NO_ERROR;
         SetEvent(wevent);
+        SetServiceStatus(hstatus, &service_status);
         break;
 
     default: