From e2f5c3c4663f0ef45ebedf18fd4dd87481d0eb4b Mon Sep 17 00:00:00 2001 From: lo-simon Date: Wed, 25 Feb 2026 03:50:41 +0000 Subject: [PATCH 1/4] Change the lambda capture to copy id_type and event_type by value to prevent them from being out of scope in the event task when the condition.wait returns early due to a shutdown --- Development/nmos/node_behaviour.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Development/nmos/node_behaviour.cpp b/Development/nmos/node_behaviour.cpp index 971dde5d..9932d3b9 100644 --- a/Development/nmos/node_behaviour.cpp +++ b/Development/nmos/node_behaviour.cpp @@ -1019,7 +1019,7 @@ namespace nmos } } - request = details::request_registration(*registration_client, events.at(0), gate, token).then([&](pplx::task finally) + request = details::request_registration(*registration_client, events.at(0), gate, token).then([&, id_type, event_type](pplx::task finally) { auto lock = model.write_lock(); // in order to update local state From 67c40708b840b902eee146725a03a34f9390b570 Mon Sep 17 00:00:00 2001 From: lo-simon Date: Wed, 25 Feb 2026 09:05:16 +0000 Subject: [PATCH 2/4] Fix possibly dangling reference to a temporary warning --- Development/nmos-cpp-node/node_implementation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Development/nmos-cpp-node/node_implementation.cpp b/Development/nmos-cpp-node/node_implementation.cpp index 1e074fe2..6a63152c 100644 --- a/Development/nmos-cpp-node/node_implementation.cpp +++ b/Development/nmos-cpp-node/node_implementation.cpp @@ -1462,7 +1462,7 @@ void node_implementation_init(nmos::node_model& model, nmos::experimental::contr utility::ostringstream_t role; role << U("sender-monitor-") << ++count; - const auto& sender = nmos::find_resource(model.node_resources, sender_id); + const auto sender = nmos::find_resource(model.node_resources, sender_id); auto sender_monitor = nmos::make_sender_monitor(++oid, true, sender_monitors_block_oid, role.str(), nmos::fields::label(sender->data), nmos::fields::description(sender->data), value_of({ { nmos::nc::details::make_touchpoint_nmos({nmos::ncp_touchpoint_resource_types::sender, sender_id}) } })); // optionally indicate dependencies within the device model nmos::set_object_dependency_paths(sender_monitor, { {U("root"), U("sender-monitors")} }); From 53d201f31171621e619b6de8bca6a262aeb9b286 Mon Sep 17 00:00:00 2001 From: lo-simon Date: Wed, 25 Feb 2026 09:37:56 +0000 Subject: [PATCH 3/4] Remove mis-leading comment --- Development/cmake/NmosCppLibraries.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Development/cmake/NmosCppLibraries.cmake b/Development/cmake/NmosCppLibraries.cmake index ca49cd85..6a8b9245 100644 --- a/Development/cmake/NmosCppLibraries.cmake +++ b/Development/cmake/NmosCppLibraries.cmake @@ -30,7 +30,7 @@ target_compile_definitions( slog INTERFACE SLOG_STATIC SLOG_LOGGING_SEVERITY=${SLOG_LOGGING_SEVERITY} - BST_THREAD_BOOST # provide bst::chrono::duration, etc. using either std:: or boost:: symbols + BST_THREAD_BOOST ) if(CMAKE_CXX_COMPILER_ID MATCHES GNU) if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8) From 4711bb1bf69c94705fb8f42310ab2153f2d2b4f1 Mon Sep 17 00:00:00 2001 From: lo-simon Date: Wed, 4 Mar 2026 09:27:19 +0000 Subject: [PATCH 4/4] model.notify()/condition.notify_all() should be part of the request chain --- Development/nmos/authorization_operation.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/Development/nmos/authorization_operation.cpp b/Development/nmos/authorization_operation.cpp index d6724636..92489f6a 100644 --- a/Development/nmos/authorization_operation.cpp +++ b/Development/nmos/authorization_operation.cpp @@ -1271,10 +1271,8 @@ namespace nmos authorization_service_error = true; } - }); - request.then([&] - { - condition.notify_all(); + + model.notify(); }); // wait for the request because interactions with the Authorization API endpoint must be sequential @@ -1853,10 +1851,8 @@ namespace nmos authorization_service_error = true; } - }); - request.then([&] - { - condition.notify_all(); + + model.notify(); }); // wait for the request because interactions with the Authorization API endpoint must be sequential @@ -1998,10 +1994,8 @@ namespace nmos authorization_service_error = true; } - }); - request.then([&] - { - condition.notify_all(); + + model.notify(); }); // wait for the request because interactions with the Authorization API endpoint must be sequential