From: Thomas Markwalder Date: Wed, 11 Nov 2015 19:55:57 +0000 (-0500) Subject: [3601] More review comments X-Git-Tag: trac4121_base~2^2~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71e6ef8777f059ba336b8d60c1688a5b626b610d;p=thirdparty%2Fkea.git [3601] More review comments Minor log message and comment wording --- diff --git a/src/lib/dhcpsrv/dhcpsrv_messages.mes b/src/lib/dhcpsrv/dhcpsrv_messages.mes index b99d15cdc9..c2f2d5dbfc 100644 --- a/src/lib/dhcpsrv/dhcpsrv_messages.mes +++ b/src/lib/dhcpsrv/dhcpsrv_messages.mes @@ -359,7 +359,7 @@ timer used for lease file cleanup scheduling. This is highly unlikely and indicates programming error. The message include the reason for this error. -% DHCPSRV_MEMFILE_NEEDS_DOWNGRADING schema of lease file: %1 is later than version %2. +% DHCPSRV_MEMFILE_NEEDS_DOWNGRADING version of lease file: %1 schema is later than version %2. A warning message issued when the schema of the lease file loaded by the server is newer than the memfile schema of the server. The server converts the lease data from newer schemas to its schema as it is read, therefore the lease @@ -367,7 +367,7 @@ information in use by the server will be correct. Note though, that any data data stored in newer schema fields will be dropped. What remains is for the file itself to be rewritten using the current schema. -% DHCPSRV_MEMFILE_NEEDS_UPGRADING schema of lease file: %1 is at version %2. +% DHCPSRV_MEMFILE_NEEDS_UPGRADING version of lease file: %1 schema is earlier than version %2. A warning message issued when the schema of the lease file loaded by the server pre-dates the memfile schema of the server. Note that the server converts the lease data from older schemas to the current schema as it is read, therefore diff --git a/src/lib/dhcpsrv/lease_file_loader.h b/src/lib/dhcpsrv/lease_file_loader.h index 203e9c705e..41fd138e84 100644 --- a/src/lib/dhcpsrv/lease_file_loader.h +++ b/src/lib/dhcpsrv/lease_file_loader.h @@ -161,7 +161,7 @@ public: ? DHCPSRV_MEMFILE_NEEDS_UPGRADING : DHCPSRV_MEMFILE_NEEDS_DOWNGRADING)) .arg(lease_file.getFilename()) - .arg(lease_file.getInputSchemaState()); + .arg(lease_file.getSchemaVersion()); } if (close_file_on_exit) { diff --git a/src/lib/util/versioned_csv_file.cc b/src/lib/util/versioned_csv_file.cc index 81478bfa30..9d4605d143 100644 --- a/src/lib/util/versioned_csv_file.cc +++ b/src/lib/util/versioned_csv_file.cc @@ -145,8 +145,10 @@ VersionedCSVFile::next(CSVRow& row) { break; case NEEDS_UPGRADE: - // Rows must be at least as long as header but not longer - // than the current schema + // The input header met the minimum column count but + // is less than the current schema so: + // Rows must not be shorter than the valid column count + // and not longer than the current schema if (row.getValuesCount() < getValidColumnCount()) { columnCountError(row, "too few columns to upgrade"); row_valid = false; @@ -163,7 +165,8 @@ VersionedCSVFile::next(CSVRow& row) { break; case NEEDS_DOWNGRADE: - // Rows may be as long as header but not shorter than + // The input header exceeded current schema so: + // Rows may be as long as input header but not shorter than // the the current schema if (row.getValuesCount() < getColumnCount()) { columnCountError(row, "too few columns to downgrade");