From cdd44e8b52c3d489e864726c0ab616c7cc93f117 Mon Sep 17 00:00:00 2001 From: rex-schilasky <49162693+rex-schilasky@users.noreply.github.com> Date: Fri, 22 Mar 2024 12:23:44 +0100 Subject: [PATCH] changed shm preprocessor define usage --- .../src/registration/ecal_registration_provider.cpp | 10 ++++++---- .../core/src/registration/ecal_registration_provider.h | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ecal/core/src/registration/ecal_registration_provider.cpp b/ecal/core/src/registration/ecal_registration_provider.cpp index a30237ce0a..3a8e8fc250 100644 --- a/ecal/core/src/registration/ecal_registration_provider.cpp +++ b/ecal/core/src/registration/ecal_registration_provider.cpp @@ -153,8 +153,10 @@ namespace eCAL // send single registration sample over udp SendSample2UDP(sample_); +#if ECAL_CORE_REGISTRATION_SHM // broadcast (updated) sample list over shm SendSampleList2SHM(); +#endif } return(true); @@ -221,11 +223,11 @@ namespace eCAL return return_value; } +#if ECAL_CORE_REGISTRATION_SHM bool CRegistrationProvider::SendSampleList2SHM() { if (!m_created) return(false); -#if ECAL_CORE_REGISTRATION_SHM bool return_value{ true }; // send sample list over shm @@ -245,10 +247,8 @@ namespace eCAL } } return return_value; -#else - return false; -#endif } +#endif void CRegistrationProvider::ClearSampleList() { @@ -281,8 +281,10 @@ namespace eCAL // send out sample list over udp SendSampleList2UDP(); +#if ECAL_CORE_REGISTRATION_SHM // broadcast sample list over shm SendSampleList2SHM(); +#endif // clear registration sample list ClearSampleList(); diff --git a/ecal/core/src/registration/ecal_registration_provider.h b/ecal/core/src/registration/ecal_registration_provider.h index e073874348..bfd0d2e3fb 100644 --- a/ecal/core/src/registration/ecal_registration_provider.h +++ b/ecal/core/src/registration/ecal_registration_provider.h @@ -67,7 +67,9 @@ namespace eCAL bool SendSample2UDP(const Registration::Sample& sample_); bool SendSampleList2UDP(); +#if ECAL_CORE_REGISTRATION_SHM bool SendSampleList2SHM(); +#endif void ClearSampleList(); void RegisterSendThread();