| 566 | } |
| 567 | |
| 568 | DDS::ReturnCode_t |
| 569 | SubscriberImpl::notify_datareaders() |
| 570 | { |
| 571 | DataReaderMap localreadermap; |
| 572 | { |
| 573 | ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, |
| 574 | guard, |
| 575 | this->si_lock_, |
| 576 | DDS::RETCODE_ERROR); |
| 577 | localreadermap = datareader_map_; |
| 578 | } |
| 579 | for (DataReaderMap::iterator it = localreadermap.begin(); it != localreadermap.end(); ++it) { |
| 580 | if (it->second->have_sample_states(DDS::NOT_READ_SAMPLE_STATE)) { |
| 581 | DDS::DataReaderListener_var listener = it->second->get_listener(); |
| 582 | if (!it->second->is_bit()) { |
| 583 | it->second->set_status_changed_flag(DDS::DATA_AVAILABLE_STATUS, false); |
| 584 | if (listener) { |
| 585 | listener->on_data_available(it->second.in()); |
| 586 | } |
| 587 | } else { |
| 588 | TheServiceParticipant->job_queue()->enqueue(make_rch<DataReaderImpl::OnDataAvailable>(listener, it->second, listener, true, false)); |
| 589 | } |
| 590 | } |
| 591 | } |
| 592 | |
| 593 | #ifndef OPENDDS_NO_MULTI_TOPIC |
| 594 | MultitopicReaderMap localmtr; |
| 595 | { |
| 596 | ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, |
| 597 | guard, |
| 598 | this->si_lock_, |
| 599 | DDS::RETCODE_ERROR); |
| 600 | localmtr = multitopic_reader_map_; |
| 601 | } |
| 602 | |
| 603 | for (MultitopicReaderMap::iterator it = localmtr.begin(); |
| 604 | it != localmtr.end(); ++it) { |
| 605 | MultiTopicDataReaderBase* dri = |
| 606 | dynamic_cast<MultiTopicDataReaderBase*>(it->second.in()); |
| 607 | |
| 608 | if (!dri) { |
| 609 | if (DCPS_debug_level > 0) { |
| 610 | ACE_ERROR((LM_ERROR, |
| 611 | ACE_TEXT("(%P|%t) ERROR: SubscriberImpl::notify_datareaders: ") |
| 612 | ACE_TEXT("failed to obtain MultiTopicDataReaderBase.\n"))); |
| 613 | } |
| 614 | return ::DDS::RETCODE_ERROR; |
| 615 | } |
| 616 | |
| 617 | if (dri->have_sample_states(DDS::NOT_READ_SAMPLE_STATE)) { |
| 618 | DDS::DataReaderListener_var listener = dri->get_listener(); |
| 619 | dri->set_status_changed_flag(DDS::DATA_AVAILABLE_STATUS, false); |
| 620 | if (!CORBA::is_nil(listener)) { |
| 621 | listener->on_data_available(dri); |
| 622 | } |
| 623 | } |
| 624 | } |
| 625 | #endif |
nothing calls this directly
no test coverage detected