Skip to content

Commit

Permalink
new API CSubscriber function "IsPublished" removed again to keep ABI …
Browse files Browse the repository at this point in the history
…compatibility within 5.13.x
  • Loading branch information
rex-schilasky committed Jun 20, 2024
1 parent 1fd13a0 commit 7c9edea
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
7 changes: 0 additions & 7 deletions ecal/core/include/ecal/ecal_subscriber.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,6 @@ namespace eCAL
**/
ECAL_API bool IsCreated() const {return(m_created);}

/**
* @brief Query if the subscriber is published.
*
* @return true if published, false if not.
**/
ECAL_API bool IsPublished() const;

/**
* @brief Query the number of publishers.
*
Expand Down
10 changes: 5 additions & 5 deletions ecal/core/src/pubsub/ecal_subscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@ namespace eCAL
return(m_datareader->RemEventCallback(type_));
}

bool CSubscriber::IsPublished() const
{
if (m_datareader == nullptr) return(false);
return(m_datareader->IsPublished());
}
//bool CSubscriber::IsPublished() const
//{
// if (m_datareader == nullptr) return(false);
// return(m_datareader->IsPublished());
//}

size_t CSubscriber::GetPublisherCount() const
{
Expand Down
5 changes: 3 additions & 2 deletions testing/ecal/pubsub_test/src/pubsub_receive_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ TEST(PubSub, TestSubscriberSeen)
auto max_lines(10);
auto receive_lambda = [&received, &max_lines](const char* /*topic_name_*/, const struct eCAL::SReceiveCallbackData* data_)
{
if (max_lines)
if (max_lines != 0)
{
// the final log should look like this
// -----------------------------------
Expand All @@ -291,7 +291,8 @@ TEST(PubSub, TestSubscriberSeen)

while (eCAL::Ok() && !publication_finished)
{
if (sub.IsPublished()) do_start_publication = true;
//if (sub.IsPublished()) do_start_publication = true;
if (sub.GetPublisherCount() > 0) do_start_publication = true;
}
};

Expand Down

0 comments on commit 7c9edea

Please sign in to comment.