| 1035 | } |
| 1036 | |
| 1037 | DDS::ReturnCode_t |
| 1038 | DataReaderImpl::get_matched_publications( |
| 1039 | DDS::InstanceHandleSeq & publication_handles) |
| 1040 | { |
| 1041 | if (!enabled_) { |
| 1042 | ACE_ERROR_RETURN((LM_ERROR, |
| 1043 | ACE_TEXT("(%P|%t) ERROR: DataReaderImpl::get_matched_publications: ") |
| 1044 | ACE_TEXT(" Entity is not enabled.\n")), |
| 1045 | DDS::RETCODE_NOT_ENABLED); |
| 1046 | } |
| 1047 | |
| 1048 | ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, |
| 1049 | guard, |
| 1050 | publication_handle_lock_, |
| 1051 | DDS::RETCODE_ERROR); |
| 1052 | |
| 1053 | // Copy out the handles for the current set of publications. |
| 1054 | publication_handles.length(static_cast<CORBA::ULong>(this->publication_id_to_handle_map_.size())); |
| 1055 | |
| 1056 | DDS::UInt32 index = 0; |
| 1057 | for (RepoIdToHandleMap::iterator |
| 1058 | current = this->publication_id_to_handle_map_.begin(); |
| 1059 | current != this->publication_id_to_handle_map_.end(); |
| 1060 | ++current, ++index) { |
| 1061 | publication_handles[index] = current->second; |
| 1062 | } |
| 1063 | |
| 1064 | return DDS::RETCODE_OK; |
| 1065 | } |
| 1066 | |
| 1067 | #if !defined (DDS_HAS_MINIMUM_BIT) |
| 1068 | DDS::ReturnCode_t |