Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Development/cmake/NmosCppLibraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Development/nmos-cpp-node/node_implementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")} });
Expand Down
18 changes: 6 additions & 12 deletions Development/nmos/authorization_operation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1271,10 +1271,8 @@ namespace nmos

authorization_service_error = true;
}
});
request.then([&]
{
condition.notify_all();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What prompted the change from condition.notify_all() to model.notify()?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The notification code has been moved into the task.next chain. By using model.notify(), the condition.notify_all() wrapper adheres to the same style as in the other behavior threads.


model.notify();
});

// wait for the request because interactions with the Authorization API endpoint must be sequential
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Development/nmos/node_behaviour.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ namespace nmos
}
}

request = details::request_registration(*registration_client, events.at(0), gate, token).then([&](pplx::task<void> finally)
request = details::request_registration(*registration_client, events.at(0), gate, token).then([&, id_type, event_type](pplx::task<void> finally)
{
auto lock = model.write_lock(); // in order to update local state

Expand Down
Loading