From a6f0774e52ad51b89c4c39e31b742c8e38d7008b Mon Sep 17 00:00:00 2001 From: midipix Date: Thu, 11 Mar 2021 12:52:20 +0000 Subject: daemon routines: properly close the internal-client-ready event as needed. --- src/daemon/ntapi_dsr_init.c | 1 - src/daemon/ntapi_dsr_internal_connection.c | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/daemon/ntapi_dsr_init.c b/src/daemon/ntapi_dsr_init.c index d74806d..20d7f87 100644 --- a/src/daemon/ntapi_dsr_init.c +++ b/src/daemon/ntapi_dsr_init.c @@ -175,7 +175,6 @@ int32_t __stdcall __ntapi_dsr_init(nt_daemon_params * params) if (params->flags & NT_DSR_INIT_CLOSE_EVENTS) { __ntapi->zw_close(params->hevent_daemon_port); __ntapi->zw_close(params->hevent_daemon_ready); - __ntapi->zw_close(params->hevent_internal_client_ready); } return NT_STATUS_SUCCESS;; diff --git a/src/daemon/ntapi_dsr_internal_connection.c b/src/daemon/ntapi_dsr_internal_connection.c index e440719..5301791 100644 --- a/src/daemon/ntapi_dsr_internal_connection.c +++ b/src/daemon/ntapi_dsr_internal_connection.c @@ -74,6 +74,9 @@ static int32_t __ntapi_dsr_internal_client_connect_impl(nt_daemon_params * param params->hevent_internal_client_ready, 0); + if (params->flags & NT_DSR_INIT_CLOSE_EVENTS) + __ntapi->zw_close(params->hevent_internal_client_ready); + /* exit the task-specific thread */ return __ntapi_dsr_internal_client_connect_exit( params,status); -- cgit v1.2.3