Skip to content

Commit

Permalink
Update resource map
Browse files Browse the repository at this point in the history
  • Loading branch information
joaofigueiredobisect committed Sep 12, 2024
1 parent cb4ad53 commit 2b48e36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cpp/libs/ossrf_nmos_api/lib/src/context/resource_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ std::vector<std::string> resource_map_t::get_sender_ids() const
{
if(resource->get_resource_type() == nmos::types::sender)
{
ids.push_back(id);
ids.push_back(resource.get()->get_id());
}
}
}
Expand All @@ -97,7 +97,7 @@ std::vector<std::string> resource_map_t::get_receiver_ids() const
{
if(resource->get_resource_type() == nmos::types::receiver)
{
ids.push_back(id);
ids.push_back(resource.get()->get_id());
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions cpp/libs/ossrf_nmos_api/lib/src/nmos_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<nmos_resource_receiver_t>(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 {};
Expand All @@ -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<nmos_resource_sender_t>(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 {};
Expand Down

0 comments on commit 2b48e36

Please sign in to comment.