]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3601] More review comments
authorThomas Markwalder <tmark@isc.org>
Wed, 11 Nov 2015 19:55:57 +0000 (14:55 -0500)
committerThomas Markwalder <tmark@isc.org>
Wed, 11 Nov 2015 19:55:57 +0000 (14:55 -0500)
Minor log message and comment wording

src/lib/dhcpsrv/dhcpsrv_messages.mes
src/lib/dhcpsrv/lease_file_loader.h
src/lib/util/versioned_csv_file.cc

index b99d15cdc943fe2de8d557b9d034c08c9aff9832..c2f2d5dbfcb3ef5641558f5b9708a53909ddeab4 100644 (file)
@@ -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
index 203e9c705e75a95faf88dcbc03338f641eb21790..41fd138e84ccbe6e59fbed7e7626757af1bc6c63 100644 (file)
@@ -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) {
index 81478bfa3031bad29f3fc916384d95394e4425ed..9d4605d143f79244951a806433363ff0fbc63e48 100644 (file)
@@ -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");