From 93e3aa4e1c29098ffc2b2b74b445198593936e97 Mon Sep 17 00:00:00 2001 From: midipix Date: Aug 04 2017 21:33:16 +0000 Subject: __ipc_connect_by_attr(): return section-related info in the _by_port code path. --- 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;