Skip to content

Commit

Permalink
Make deprecated properties and methods return OK
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-r-thorpe committed May 10, 2024
1 parent b2ae537 commit 1e28e16
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 1e28e16

Please sign in to comment.