MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / remove_subscription

Method remove_subscription

dds/DCPS/RTPS/Sedp.cpp:6622–6647  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6620}
6621
6622void Sedp::remove_subscription(const GUID_t& subscriptionId)
6623{
6624 ACE_GUARD(ACE_Thread_Mutex, g, lock_);
6625 LocalSubscriptionIter iter = local_subscriptions_.find(subscriptionId);
6626 if (iter != local_subscriptions_.end()) {
6627 if (DDS::RETCODE_OK == remove_subscription_i(subscriptionId, iter->second)) {
6628 String topic_name = topic_names_[iter->second.topic_id_];
6629#if OPENDDS_CONFIG_SECURITY
6630 if (is_security_enabled()) {
6631 cleanup_secure_reader(subscriptionId);
6632 }
6633#endif
6634 local_subscriptions_.erase(subscriptionId);
6635 DCPS::TopicDetailsMap::iterator top_it = topics_.find(topic_name);
6636 if (top_it != topics_.end()) {
6637 match_endpoints(subscriptionId, top_it->second, true /*remove*/);
6638 top_it->second.remove_local_subscription(subscriptionId);
6639 // Local, no need to check for dead topic.
6640 }
6641 } else {
6642 ACE_ERROR((LM_ERROR,
6643 ACE_TEXT("(%P|%t) ERROR: Sedp::remove_subscription: ")
6644 ACE_TEXT("Failed to publish dispose msg\n")));
6645 }
6646 }
6647}
6648
6649void Sedp::update_subscription_locators(
6650 const GUID_t& subscriptionId,

Callers 4

cleanupMethod · 0.45
delete_datareaderMethod · 0.45
remove_from_bit_iMethod · 0.45
remove_subscriptionFunction · 0.45

Calls 5

is_security_enabledFunction · 0.85
findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected