| 6620 | } |
| 6621 | |
| 6622 | void 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 | |
| 6649 | void Sedp::update_subscription_locators( |
| 6650 | const GUID_t& subscriptionId, |
no test coverage detected