Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix enum sequence and struct sequence validation #412

Merged
merged 5 commits into from
Oct 14, 2024
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
41 changes: 31 additions & 10 deletions Development/nmos/control_protocol_methods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
// unknown property
utility::stringstream_t ss;
ss << U("unknown property: ") << property_id.serialize() << U(" to do Get");
slog::log<slog::severities::error>(gate, SLOG_FLF) << ss.str();

Check warning on line 33 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: false)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 33 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2019: build and test (install mdns: false, use conan: true, force cpprest asio: false, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 33 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 33 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2019: build and test (install mdns: false, use conan: true, force cpprest asio: false, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 33 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: false)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 33 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'
return details::make_nc_method_result_error({ nc_method_status::property_not_implemented }, ss.str());
}

Expand Down Expand Up @@ -82,15 +83,17 @@
}
catch (const nmos::control_protocol_exception& e)
{
slog::log<slog::severities::error>(gate, SLOG_FLF) << "Set property: " << property_id.serialize() << " value: " << val.serialize() << " error: " << e.what();

return details::make_nc_method_result({ nc_method_status::parameter_error });
utility::stringstream_t ss;
ss << "Set property: " << property_id.serialize() << " value: " << val.serialize() << " error: " << e.what();
slog::log<slog::severities::error>(gate, SLOG_FLF) << ss.str();

Check warning on line 88 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: false)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 88 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2019: build and test (install mdns: false, use conan: true, force cpprest asio: false, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 88 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 88 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2019: build and test (install mdns: false, use conan: true, force cpprest asio: false, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 88 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: false)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 88 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'
return details::make_nc_method_result_error({ nc_method_status::parameter_error }, ss.str());
}
}

// unknown property
utility::stringstream_t ss;
ss << U("unknown property: ") << property_id.serialize() << " to do Set";
slog::log<slog::severities::error>(gate, SLOG_FLF) << ss.str();

Check warning on line 96 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: false)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 96 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2019: build and test (install mdns: false, use conan: true, force cpprest asio: false, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 96 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 96 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2019: build and test (install mdns: false, use conan: true, force cpprest asio: false, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 96 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: false)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 96 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'
return details::make_nc_method_result_error({ nc_method_status::property_not_implemented }, ss.str());
}

Expand Down Expand Up @@ -126,12 +129,14 @@
// out of bound
utility::stringstream_t ss;
ss << U("property: ") << property_id.serialize() << U(" is outside the available range to do GetSequenceItem");
slog::log<slog::severities::error>(gate, SLOG_FLF) << ss.str();

Check warning on line 132 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: false)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 132 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2019: build and test (install mdns: false, use conan: true, force cpprest asio: false, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 132 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 132 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2019: build and test (install mdns: false, use conan: true, force cpprest asio: false, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 132 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: false)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 132 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'
return details::make_nc_method_result_error({ nc_method_status::index_out_of_bounds }, ss.str());
}

// unknown property
utility::stringstream_t ss;
ss << U("unknown property: ") << property_id.serialize() << U(" to do GetSequenceItem");
slog::log<slog::severities::error>(gate, SLOG_FLF) << ss.str();

Check warning on line 139 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: false)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 139 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2019: build and test (install mdns: false, use conan: true, force cpprest asio: false, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 139 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 139 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2019: build and test (install mdns: false, use conan: true, force cpprest asio: false, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 139 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: false)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 139 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'
return details::make_nc_method_result_error({ nc_method_status::property_not_implemented }, ss.str());
}

Expand Down Expand Up @@ -163,6 +168,7 @@
// property is not a sequence
utility::stringstream_t ss;
ss << U("property: ") << property_id.serialize() << U(" is not a sequence to do SetSequenceItem");
slog::log<slog::severities::error>(gate, SLOG_FLF) << ss.str();

Check warning on line 171 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: false)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 171 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2019: build and test (install mdns: false, use conan: true, force cpprest asio: false, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 171 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 171 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2019: build and test (install mdns: false, use conan: true, force cpprest asio: false, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 171 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: false)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 171 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'
return details::make_nc_method_result_error({ nc_method_status::invalid_request }, ss.str());
}

Expand Down Expand Up @@ -190,21 +196,24 @@
}
catch (const nmos::control_protocol_exception& e)
{
slog::log<slog::severities::error>(gate, SLOG_FLF) << "Set sequence item: " << property_id.serialize() << " index: " << index << " value: " << val.serialize() << " error: " << e.what();

return details::make_nc_method_result({ nc_method_status::parameter_error });
utility::stringstream_t ss;
ss << "Set sequence item: " << property_id.serialize() << " index: " << index << " value: " << val.serialize() << " error: " << e.what();
slog::log<slog::severities::error>(gate, SLOG_FLF) << ss.str();

Check warning on line 201 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: false)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 201 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2019: build and test (install mdns: false, use conan: true, force cpprest asio: false, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 201 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 201 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2019: build and test (install mdns: false, use conan: true, force cpprest asio: false, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 201 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: false)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 201 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'
return details::make_nc_method_result_error({ nc_method_status::parameter_error }, ss.str());
}
}

// out of bound
utility::stringstream_t ss;
ss << U("property: ") << property_id.serialize() << U(" is outside the available range to do SetSequenceItem");
slog::log<slog::severities::error>(gate, SLOG_FLF) << ss.str();

Check warning on line 209 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: false)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 209 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2019: build and test (install mdns: false, use conan: true, force cpprest asio: false, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 209 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 209 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2019: build and test (install mdns: false, use conan: true, force cpprest asio: false, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 209 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: false)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 209 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'
return details::make_nc_method_result_error({ nc_method_status::index_out_of_bounds }, ss.str());
}

// unknown property
utility::stringstream_t ss;
ss << U("unknown property: ") << property_id.serialize() << U(" to do SetSequenceItem");
slog::log<slog::severities::error>(gate, SLOG_FLF) << ss.str();

Check warning on line 216 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: false)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 216 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2019: build and test (install mdns: false, use conan: true, force cpprest asio: false, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 216 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 216 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2019: build and test (install mdns: false, use conan: true, force cpprest asio: false, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 216 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: false)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 216 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'
return details::make_nc_method_result_error({ nc_method_status::property_not_implemented }, ss.str());
}

Expand Down Expand Up @@ -266,15 +275,17 @@
}
catch (const nmos::control_protocol_exception& e)
{
slog::log<slog::severities::error>(gate, SLOG_FLF) << "Add sequence item: " << property_id.serialize() << " value: " << val.serialize() << " error: " << e.what();

return details::make_nc_method_result({ nc_method_status::parameter_error });
utility::stringstream_t ss;
ss << "Add sequence item: " << property_id.serialize() << " value: " << val.serialize() << " error: " << e.what();
slog::log<slog::severities::error>(gate, SLOG_FLF) << ss.str();

Check warning on line 280 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: false)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 280 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2019: build and test (install mdns: false, use conan: true, force cpprest asio: false, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 280 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 280 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2019: build and test (install mdns: false, use conan: true, force cpprest asio: false, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 280 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: false)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'

Check warning on line 280 in Development/nmos/control_protocol_methods.cpp

View workflow job for this annotation

GitHub Actions / windows-2022: build and test (install mdns: false, use conan: true, force cpprest asio: true, dns-sd mode: multicast, enable_authorization: true)

nonstandard extension used: 'argument': conversion from 'slog::detail::`anonymous-namespace'::log<slog::base_gate,20>' to 'slog::log_statement &'
return details::make_nc_method_result_error({ nc_method_status::parameter_error }, ss.str());
}
}

// unknown property
utility::stringstream_t ss;
ss << U("unknown property: ") << property_id.serialize() << U(" to do AddSequenceItem");
slog::log<slog::severities::error>(gate, SLOG_FLF) << ss.str();
return details::make_nc_method_result_error({ nc_method_status::property_not_implemented }, ss.str());
}

Expand All @@ -299,6 +310,7 @@
// property is not a sequence
utility::stringstream_t ss;
ss << U("property: ") << property_id.serialize() << U(" is not a sequence to do RemoveSequenceItem");
slog::log<slog::severities::error>(gate, SLOG_FLF) << ss.str();
return details::make_nc_method_result_error({ nc_method_status::invalid_request }, ss.str());
}

Expand All @@ -317,12 +329,14 @@
// out of bound
utility::stringstream_t ss;
ss << U("property: ") << property_id.serialize() << U(" is outside the available range to do RemoveSequenceItem");
slog::log<slog::severities::error>(gate, SLOG_FLF) << ss.str();
return details::make_nc_method_result_error({ nc_method_status::index_out_of_bounds }, ss.str());
}

// unknown property
utility::stringstream_t ss;
ss << U("unknown property: ") << property_id.serialize() << U(" to do RemoveSequenceItem");
slog::log<slog::severities::error>(gate, SLOG_FLF) << ss.str();
return details::make_nc_method_result_error({ nc_method_status::property_not_implemented }, ss.str());
}

Expand All @@ -346,6 +360,7 @@
// property is not a sequence
utility::stringstream_t ss;
ss << U("property: ") << property_id.serialize() << U(" is not a sequence to do GetSequenceLength");
slog::log<slog::severities::error>(gate, SLOG_FLF) << ss.str();
return details::make_nc_method_result_error({ nc_method_status::invalid_request }, ss.str());
}

Expand All @@ -368,6 +383,7 @@
// null
utility::stringstream_t ss;
ss << U("property: ") << property_id.serialize() << " is a null sequence to do GetSequenceLength";
slog::log<slog::severities::error>(gate, SLOG_FLF) << ss.str();
return details::make_nc_method_result_error({ nc_method_status::invalid_request }, ss.str());
}
}
Expand All @@ -377,6 +393,7 @@
// unknown property
utility::stringstream_t ss;
ss << U("unknown property: ") << property_id.serialize() << " to do GetSequenceLength";
slog::log<slog::severities::error>(gate, SLOG_FLF) << ss.str();
return details::make_nc_method_result_error({ nc_method_status::property_not_implemented }, ss.str());
}

Expand Down Expand Up @@ -444,13 +461,17 @@
// no role
utility::stringstream_t ss;
ss << U("role: ") << role.as_string() << U(" not found to do FindMembersByPath");
slog::log<slog::severities::error>(gate, SLOG_FLF) << ss.str();
return details::make_nc_method_result_error({ nc_method_status::parameter_error }, ss.str());
}
}
else
{
// no members
return details::make_nc_method_result_error({ nc_method_status::parameter_error }, U("no members to do FindMembersByPath"));
utility::stringstream_t ss;
ss << U("role: ") << role.as_string() << U(" has no members to do FindMembersByPath");
slog::log<slog::severities::error>(gate, SLOG_FLF) << ss.str();
return details::make_nc_method_result_error({ nc_method_status::parameter_error }, ss.str());
}
}

Expand Down
Loading
Loading