mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 12:33:44 +02:00
Fix some old column names in netconf.
This commit is contained in:
parent
7701e25a45
commit
9ece65da23
1 changed files with 2 additions and 4 deletions
|
@ -220,8 +220,6 @@ int main(int argc,char **argv)
|
||||||
if (rs[0]["identity"] != peerIdentity.toString(false)) {
|
if (rs[0]["identity"] != peerIdentity.toString(false)) {
|
||||||
// TODO: handle collisions...
|
// TODO: handle collisions...
|
||||||
continue;
|
continue;
|
||||||
} else if ((int)rs[0]["identityValidated"] == 0) {
|
|
||||||
// TODO: launch background validation
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
q = dbCon->query();
|
q = dbCon->query();
|
||||||
|
@ -251,7 +249,7 @@ int main(int argc,char **argv)
|
||||||
std::string desc;
|
std::string desc;
|
||||||
{
|
{
|
||||||
Query q = dbCon->query();
|
Query q = dbCon->query();
|
||||||
q << "SELECT name,`desc`,isOpen,multicastPrefixBits,multicastDepth FROM Network WHERE id = " << nwid;
|
q << "SELECT name,`desc`,isOpen,multicastPrefixBits,multicastDepth,emulateArp,emulateNdp FROM Network WHERE id = " << nwid;
|
||||||
StoreQueryResult rs = q.store();
|
StoreQueryResult rs = q.store();
|
||||||
if (rs.num_rows() > 0) {
|
if (rs.num_rows() > 0) {
|
||||||
name = rs[0]["name"].c_str();
|
name = rs[0]["name"].c_str();
|
||||||
|
@ -411,7 +409,7 @@ int main(int argc,char **argv)
|
||||||
// Update activity table for this network to indicate peer's participation
|
// Update activity table for this network to indicate peer's participation
|
||||||
{
|
{
|
||||||
Query q = dbCon->query();
|
Query q = dbCon->query();
|
||||||
q << "INSERT INTO NetworkActivity (Network_id,Node_id,lastActivityTime,lastActivityFrom) VALUES (" << nwid << "," << peerIdentity.address().toInt() << "," << Utils::now() << "," << fromAddr << ") ON DUPLICATE KEY UPDATE lastActivityTime = VALUES(lastActivityTime),lastActivityFrom = VALUES(lastActivityFrom)";
|
q << "INSERT INTO NetworkActivity (Network_id,Node_id,lastActivityTime,lastActivityFrom) VALUES (" << nwid << "," << peerIdentity.address().toInt() << "," << Utils::now() << "," << quote << fromAddr << ") ON DUPLICATE KEY UPDATE lastActivityTime = VALUES(lastActivityTime),lastActivityFrom = VALUES(lastActivityFrom)";
|
||||||
q.exec();
|
q.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue