Skip to content

Commit

Permalink
changed shm preprocessor define usage
Browse files Browse the repository at this point in the history
  • Loading branch information
rex-schilasky committed Mar 22, 2024
1 parent f1d8efe commit cdd44e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ecal/core/src/registration/ecal_registration_provider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand All @@ -245,10 +247,8 @@ namespace eCAL
}
}
return return_value;
#else
return false;
#endif
}
#endif

void CRegistrationProvider::ClearSampleList()
{
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions ecal/core/src/registration/ecal_registration_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit cdd44e8

Please sign in to comment.