From 5562d45a3c2950e399172ab01a1ed213af489fd1 Mon Sep 17 00:00:00 2001 From: Filippo Mutta Date: Wed, 12 Jun 2024 10:45:42 +0200 Subject: [PATCH] Using correct FD for socket and not including headears on non-unix functions. --- src/pc/protocols/local_memshd.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pc/protocols/local_memshd.cpp b/src/pc/protocols/local_memshd.cpp index 6a0e9da..8e6a124 100644 --- a/src/pc/protocols/local_memshd.cpp +++ b/src/pc/protocols/local_memshd.cpp @@ -5,6 +5,11 @@ #include "local_memshd.h" #include "../PlatformDeviceFd.h" + +#define MVLOG_UNIT_NAME local_memshd +#include "XLinkLog.h" + +#if defined(__unix__) #include #include #include @@ -14,11 +19,6 @@ #include #include -#define MVLOG_UNIT_NAME local_memshd -#include "XLinkLog.h" - -#if defined(__unix__) - int shdmem_initialize() { printf("Shared mem initialize function called\n"); return 0; @@ -84,7 +84,7 @@ int shdmemPlatformServer(const char *devPathRead, const char *devPathWrite, void // Store the socket and create a "unique" key instead // (as file descriptors are reused and can cause a clash with lookups between scheduler and link) - *fd = createPlatformDeviceFdKey((void*) (uintptr_t) socketFd); + *fd = createPlatformDeviceFdKey((void*) (uintptr_t) clientFd); return 0;