diff options
-rw-r--r-- | src/ipc/ntapi_ipc_connect.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/ipc/ntapi_ipc_connect.c b/src/ipc/ntapi_ipc_connect.c index fe3561a..fceb527 100644 --- a/src/ipc/ntapi_ipc_connect.c +++ b/src/ipc/ntapi_ipc_connect.c @@ -63,12 +63,9 @@ static int32_t __ipc_connect_by_attr( &attr->guid, &conn->guid)) { /* already connected */ - if (hconn) + if (hconn && ((uintptr_t)hconn != node->key)) return __ipc_connect_return( - hlock, - ((uintptr_t)hconn == node->key) - ? NT_STATUS_SUCCESS - : NT_STATUS_CONTEXT_MISMATCH); + hlock,NT_STATUS_CONTEXT_MISMATCH); *hport = (void *)node->key; *hsection = ipc->hsection; |