Review comments

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2019-05-26 22:06:07 +02:00
parent dacfe3d9ca
commit e1e7fa9512
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -269,10 +269,10 @@ void db_init(void)
dbversion = db_get_FTL_property(DB_VERSION);
}
//Update to version 4 if lower
// Update to version 4 if lower
if(dbversion < 4)
{
// Update to version 3: Create network table
// Update to version 4: Unify clients in network table
logg("Updating long-term database to version 4");
unify_hwaddr(db);
// Get updated version
+2 -2
View File
@@ -88,7 +88,7 @@ void parse_arp_cache(void)
continue;
// Get ID of this device in our network database. If it cannot be
// found, then this is a new device We only use the hardware address
// found, then this is a new device. We only use the hardware address
// to uniquely identify clients and only use the first returned ID.
//
// Same MAC, two IPs: Non-deterministic (sequential) DHCP server, we
@@ -283,7 +283,7 @@ bool unify_hwaddr(sqlite3 *db)
// See https://www.sqlite.org/lang_createtable.html#constraints:
// >>> In most cases, UNIQUE and PRIMARY KEY constraints are
// >>> implemented by creating a unique index in the database.
dbquery("CREATE UNIQUE INDEX hwaddr_idx ON network(hwaddr)");
dbquery("CREATE UNIQUE INDEX network_hwaddr_idx ON network(hwaddr)");
// Update database version to 4
if(!db_set_FTL_property(DB_VERSION, 4))