From 93e3aa4e1c29098ffc2b2b74b445198593936e97 Mon Sep 17 00:00:00 2001 From: midipix Date: Fri, 4 Aug 2017 22:22:22 +0000 Subject: __ipc_connect_by_attr(): return section-related info in the _by_port code path. --- src/ipc/ntapi_ipc_connect.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') 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; -- cgit v1.2.3