diff --git a/cpp/libs/ossrf_nmos_api/lib/src/context/resource_map.cpp b/cpp/libs/ossrf_nmos_api/lib/src/context/resource_map.cpp index 1be2afd..dd8f112 100644 --- a/cpp/libs/ossrf_nmos_api/lib/src/context/resource_map.cpp +++ b/cpp/libs/ossrf_nmos_api/lib/src/context/resource_map.cpp @@ -79,7 +79,7 @@ std::vector resource_map_t::get_sender_ids() const { if(resource->get_resource_type() == nmos::types::sender) { - ids.push_back(id); + ids.push_back(resource->get_id()); } } } @@ -97,7 +97,7 @@ std::vector resource_map_t::get_receiver_ids() const { if(resource->get_resource_type() == nmos::types::receiver) { - ids.push_back(id); + ids.push_back(resource->get_id()); } } } diff --git a/cpp/libs/ossrf_nmos_api/lib/src/nmos_client.cpp b/cpp/libs/ossrf_nmos_api/lib/src/nmos_client.cpp index bf60fde..c5687f7 100644 --- a/cpp/libs/ossrf_nmos_api/lib/src/nmos_client.cpp +++ b/cpp/libs/ossrf_nmos_api/lib/src/nmos_client.cpp @@ -85,7 +85,7 @@ maybe_ok nmos_client_t::add_receiver(const std::string& device_id, const std::st BST_CHECK(impl_->context_->nmos().add_receiver(device_id, receiver_config)); auto r = std::make_shared(device_id, receiver_config, callback); - impl_->context_->resources().insert(receiver_config.id, std::move(r)); + impl_->context_->resources().insert(device_id, std::move(r)); BST_CHECK(update_device_sub_resources(impl_->context_, device_id)); return {}; @@ -101,7 +101,7 @@ maybe_ok nmos_client_t::add_sender(const std::string& device_id, const std::stri BST_CHECK(impl_->context_->nmos().add_sender(device_id, sender_config)); auto r = std::make_shared(device_id, sender_config, callback); - impl_->context_->resources().insert(sender_config.id, std::move(r)); + impl_->context_->resources().insert(device_id, std::move(r)); BST_CHECK(update_device_sub_resources(impl_->context_, device_id)); return {};