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

Method association_complete_i

dds/DCPS/ReplayerImpl.cpp:487–553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485}
486
487void
488ReplayerImpl::association_complete_i(const GUID_t& remote_id)
489{
490 DBG_ENTRY_LVL("ReplayerImpl", "association_complete_i", 6);
491 // bool reader_durable = false;
492 {
493 ACE_GUARD(ACE_Recursive_Thread_Mutex, guard, this->lock_);
494 if (OpenDDS::DCPS::insert(readers_, remote_id) == -1) {
495 ACE_ERROR((LM_ERROR,
496 ACE_TEXT("(%P|%t) ERROR: ReplayerImpl::association_complete_i: ")
497 ACE_TEXT("insert %C from pending failed.\n"),
498 LogGuid(remote_id).c_str()));
499 }
500 // RepoIdToReaderInfoMap::const_iterator it = reader_info_.find(remote_id);
501 // if (it != reader_info_.end()) {
502 // reader_durable = it->second.durable_;
503 // }
504 }
505
506 if (!is_bit_) {
507
508 const DDS::InstanceHandle_t handle = participant_servant_->assign_handle(remote_id);
509
510 {
511 // protect publication_match_status_ and status changed flags.
512 ACE_GUARD(ACE_Recursive_Thread_Mutex, guard, this->lock_);
513
514 // update the publication_match_status_
515 ++publication_match_status_.total_count;
516 ++publication_match_status_.total_count_change;
517 ++publication_match_status_.current_count;
518 ++publication_match_status_.current_count_change;
519
520 if (OpenDDS::DCPS::bind(id_to_handle_map_, remote_id, handle) != 0) {
521 ACE_DEBUG((LM_WARNING,
522 ACE_TEXT("(%P|%t) ERROR: ReplayerImpl::association_complete_i: ")
523 ACE_TEXT("id_to_handle_map_%C = 0x%x failed.\n"),
524 LogGuid(remote_id).c_str(),
525 handle));
526 return;
527
528 } else if (DCPS_debug_level > 4) {
529 ACE_DEBUG((LM_DEBUG,
530 ACE_TEXT("(%P|%t) ReplayerImpl::association_complete_i: ")
531 ACE_TEXT("id_to_handle_map_%C = 0x%x.\n"),
532 LogGuid(remote_id).c_str(),
533 handle));
534 }
535
536 publication_match_status_.last_subscription_handle = handle;
537
538 }
539
540
541 if (listener_.in()) {
542 listener_->on_replayer_matched(this,
543 publication_match_status_);
544

Callers

nothing calls this directly

Calls 6

insertFunction · 0.85
LogGuidFunction · 0.85
assign_handleMethod · 0.80
bindFunction · 0.70
inMethod · 0.45
on_replayer_matchedMethod · 0.45

Tested by

no test coverage detected