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

Make deprecated properties and methods return OK #3

Merged
merged 1 commit into from
May 16, 2024
Merged
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
4 changes: 2 additions & 2 deletions Development/nmos/configuration_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ namespace nmos
}

auto status = nmos::fields::nc::status(method_result);
if (nc_method_status::ok == status) { code = status_codes::OK; }
if (nc_method_status::ok == status || nc_method_status::method_deprecated == status) { code = status_codes::OK; }
else if (nc_method_status::parameter_error == status) { code = status_codes::BadRequest; }
else if (nc_method_status::device_error == status) { code = status_codes::InternalError; }
else { code = status_codes::InternalError; }
Expand Down Expand Up @@ -635,7 +635,7 @@ namespace nmos
auto result = set(resources, *resource, 0, arguments, false, get_control_protocol_class_descriptor, get_control_protocol_datatype_descriptor, property_changed, gate).at(nmos::fields::nc::result);

auto status = nmos::fields::nc::status(result);
auto code = nc_method_status::ok == status ? status_codes::OK : status_codes::InternalError;
auto code = (nc_method_status::ok == status || nc_method_status::property_deprecated == status) ? status_codes::OK : status_codes::InternalError;
set_reply(res, code, result);
}
}
Expand Down
Loading