diff options
author | Josh Lehan <krellan@google.com> | 2021-12-15 05:29:06 +0300 |
---|---|---|
committer | Josh Lehan <krellan@google.com> | 2021-12-16 05:50:31 +0300 |
commit | 5187e09b891b9d0f12c76736caaa062120fd19f7 (patch) | |
tree | 3c7d6dc396832443db9c85ab5ce230fd6f501366 | |
parent | 6fbdbcabc3ae43dc372459c6c5ae4d53657267f5 (diff) | |
download | bmcweb-5187e09b891b9d0f12c76736caaa062120fd19f7.tar.xz |
error_messages: Use int64_t in invalidIndex
Using int64_t instead of int, to permit 64-bit indices.
This is to support ExternalStorer, a new project I am working on,
which uses a 64-bit sequence number for long-term robustness.
Change-Id: I00121933067030fd722f6b02c2d2dbd1854dff1c
Signed-off-by: Josh Lehan <krellan@google.com>
-rw-r--r-- | redfish-core/include/error_messages.hpp | 4 | ||||
-rw-r--r-- | redfish-core/src/error_messages.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/redfish-core/include/error_messages.hpp b/redfish-core/include/error_messages.hpp index c9a919a420..5bee7b086c 100644 --- a/redfish-core/include/error_messages.hpp +++ b/redfish-core/include/error_messages.hpp @@ -785,9 +785,9 @@ void actionNotSupported(crow::Response& res, const std::string& arg1); * @param[in] arg1 Parameter of message that will replace %1 in its body. * * @returns Message InvalidIndex formatted to JSON */ -nlohmann::json invalidIndex(const int& arg1); +nlohmann::json invalidIndex(int64_t arg1); -void invalidIndex(crow::Response& res, const int& arg1); +void invalidIndex(crow::Response& res, int64_t arg1); /** * @brief Formats EmptyJSON message into JSON diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp index cb4d69c226..3fd48a2c04 100644 --- a/redfish-core/src/error_messages.cpp +++ b/redfish-core/src/error_messages.cpp @@ -1750,7 +1750,7 @@ void actionNotSupported(crow::Response& res, const std::string& arg1) * See header file for more information * @endinternal */ -nlohmann::json invalidIndex(const int& arg1) +nlohmann::json invalidIndex(int64_t arg1) { return nlohmann::json{ {"@odata.type", "#Message.v1_1_1.Message"}, @@ -1763,7 +1763,7 @@ nlohmann::json invalidIndex(const int& arg1) "bounds of the array."}}; } -void invalidIndex(crow::Response& res, const int& arg1) +void invalidIndex(crow::Response& res, int64_t arg1) { res.result(boost::beast::http::status::bad_request); addMessageToErrorJson(res.jsonValue, invalidIndex(arg1)); |