Commit 57177891 authored by Thomas Markwalder's avatar Thomas Markwalder

[#805,!5-p] Addressed review comments

    Minor cleanup and commentary.
parent 3d097f24
......@@ -182,7 +182,7 @@ DbAccessParser::parse(std::string& access_string,
// f. Check that the max-row-errors is within a reasonable range.
if ((max_row_errors < 0) ||
(max_row_errors > std::numeric_limits<uint16_t>::max())) {
(max_row_errors > std::numeric_limits<uint32_t>::max())) {
ConstElementPtr value = database_config->get("max-row-errors");
isc_throw(DbConfigError, "max-row-errors value: " << max_row_errors
<< " is out of range, expected value: 0.."
......
......@@ -277,7 +277,8 @@ TEST(DatabaseConnection, toElementDbAccessStringValid) {
"\"tcp-keepalive\": 101, \n"
"\"tcp-nodelay\": false, \n"
"\"type\": \"memfile\", \n"
"\"user\": \"user_str\" \n"
"\"user\": \"user_str\", \n"
"\"max-row-errors\": 50 \n"
"}\n"
};
......
......@@ -507,7 +507,7 @@ TEST_F(DbAccessParserTest, negativeMaxRowErrors) {
}
// This test checks that the parser rejects a too large (greater than
// the max uint32_t) value of the timeout parameter.
// the max uint32_t) value of the max-row-errors parameter.
TEST_F(DbAccessParserTest, largeMaxRowErrors) {
const char* config[] = {"type", "memfile",
"name", "/opt/var/lib/kea/kea-leases6.csv",
......
......@@ -1422,7 +1422,7 @@ bool Memfile_LeaseMgr::loadLeasesFromFiles(const std::string& filename,
try {
max_row_errors_str = conn_.getParameter("max-row-errors");
} catch (const std::exception&) {
// Ignore and default to 3600.
// Ignore and default to 0.
}
uint32_t max_row_errors = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment