diff --git a/ecal/core/include/ecal/ecal_subscriber.h b/ecal/core/include/ecal/ecal_subscriber.h index 96350e5695..147b1b3a3e 100644 --- a/ecal/core/include/ecal/ecal_subscriber.h +++ b/ecal/core/include/ecal/ecal_subscriber.h @@ -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. * diff --git a/ecal/core/src/pubsub/ecal_subscriber.cpp b/ecal/core/src/pubsub/ecal_subscriber.cpp index dcd3b8f7f1..0883739c87 100644 --- a/ecal/core/src/pubsub/ecal_subscriber.cpp +++ b/ecal/core/src/pubsub/ecal_subscriber.cpp @@ -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 { diff --git a/testing/ecal/pubsub_test/src/pubsub_receive_test.cpp b/testing/ecal/pubsub_test/src/pubsub_receive_test.cpp index ce63f1576a..fa10df9ead 100644 --- a/testing/ecal/pubsub_test/src/pubsub_receive_test.cpp +++ b/testing/ecal/pubsub_test/src/pubsub_receive_test.cpp @@ -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 // ----------------------------------- @@ -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; } };