| 449 | } |
| 450 | |
| 451 | DDS::ReturnCode_t |
| 452 | WriteDataContainer::unregister( |
| 453 | DDS::InstanceHandle_t instance_handle, |
| 454 | Message_Block_Ptr& registered_sample, |
| 455 | bool dup_registered_sample) |
| 456 | { |
| 457 | ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, |
| 458 | guard, |
| 459 | lock_, |
| 460 | DDS::RETCODE_ERROR); |
| 461 | |
| 462 | PublicationInstance_rch instance; |
| 463 | { |
| 464 | PublicationInstanceMapType::iterator pos = instances_.find(instance_handle); |
| 465 | if (pos == instances_.end()) { |
| 466 | ACE_ERROR_RETURN((LM_ERROR, |
| 467 | ACE_TEXT("(%P|%t) ERROR: ") |
| 468 | ACE_TEXT("WriteDataContainer::unregister, ") |
| 469 | ACE_TEXT("The instance(handle=%X) ") |
| 470 | ACE_TEXT("is not registered yet.\n"), |
| 471 | instance_handle), |
| 472 | DDS::RETCODE_PRECONDITION_NOT_MET); |
| 473 | } |
| 474 | instance = pos->second; |
| 475 | instances_.erase(pos); |
| 476 | } |
| 477 | |
| 478 | return remove_instance(instance, registered_sample, dup_registered_sample); |
| 479 | } |
| 480 | |
| 481 | DDS::ReturnCode_t |
| 482 | WriteDataContainer::dispose(DDS::InstanceHandle_t instance_handle, |
no test coverage detected