summaryrefslogtreecommitdiff
path: root/redfish-core/lib/log_services.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-02-04 03:29:50 +0300
committerEd Tanous <edtanous@google.com>2022-02-04 20:29:51 +0300
commit50b8a43af501412f93a93ccce34a9ea7abb6d57f (patch)
treed89ef940061fd533c9bf3a16b0b09bd6afbd8813 /redfish-core/lib/log_services.hpp
parentc419c759177f7d42af4848bc9d16bca3c1644387 (diff)
downloadbmcweb-50b8a43af501412f93a93ccce34a9ea7abb6d57f.tar.xz
Remove NEW_BOOST_URL macro
Now that the subtree update is done, this define is no longer needed. Tested: Code compiles. Noop. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Idc5d7ef69c009982a2476fadc1d95e3280bfff48
Diffstat (limited to 'redfish-core/lib/log_services.hpp')
-rw-r--r--redfish-core/lib/log_services.hpp54
1 files changed, 1 insertions, 53 deletions
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index e20a2baacf..f35db24723 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -181,7 +181,7 @@ inline static bool getEntryTimestamp(sd_journal* journal,
entryTimestamp = crow::utility::getDateTimeUint(timestamp / 1000 / 1000);
return true;
}
-#ifdef NEW_BOOST_URL
+
static bool getSkipParam(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const crow::Request& req, uint64_t& skip)
{
@@ -225,58 +225,6 @@ static bool getTopParam(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
return true;
}
-#else
-
-static bool getSkipParam(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const crow::Request& req, uint64_t& skip)
-{
- boost::urls::query_params_view::iterator it = req.urlParams.find("$skip");
- if (it != req.urlParams.end())
- {
- std::string skipParam = it->value();
- char* ptr = nullptr;
- skip = std::strtoul(skipParam.c_str(), &ptr, 10);
- if (skipParam.empty() || *ptr != '\0')
- {
-
- messages::queryParameterValueTypeError(
- asyncResp->res, std::string(skipParam), "$skip");
- return false;
- }
- }
- return true;
-}
-
-static constexpr const uint64_t maxEntriesPerPage = 1000;
-static bool getTopParam(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const crow::Request& req, uint64_t& top)
-{
- boost::urls::query_params_view::iterator it = req.urlParams.find("$top");
- if (it != req.urlParams.end())
- {
- std::string topParam = it->value();
- char* ptr = nullptr;
- top = std::strtoul(topParam.c_str(), &ptr, 10);
- if (topParam.empty() || *ptr != '\0')
- {
- messages::queryParameterValueTypeError(
- asyncResp->res, std::string(topParam), "$top");
- return false;
- }
- if (top < 1U || top > maxEntriesPerPage)
- {
-
- messages::queryParameterOutOfRange(
- asyncResp->res, std::to_string(top), "$top",
- "1-" + std::to_string(maxEntriesPerPage));
- return false;
- }
- }
- return true;
-}
-
-#endif
-
inline static bool getUniqueEntryID(sd_journal* journal, std::string& entryID,
const bool firstEntry = true)
{