mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-16 06:08:15 +00:00
More fun with dupes
This commit is contained in:
@ -530,7 +530,12 @@ void PostgreSQL::initializeMembers(PGconn *conn)
|
||||
|
||||
int n = PQntuples(r2);
|
||||
for (int j = 0; j < n; ++j) {
|
||||
config["ipAssignments"].push_back(PQgetvalue(r2, j, 0));
|
||||
std::string ipaddr = PQgetvalue(r2, j, 0);
|
||||
std::size_t pos = ipaddr.find('/');
|
||||
if (pos != std::string::npos) {
|
||||
ipaddr = ipaddr.substr(0, pos);
|
||||
}
|
||||
config["ipAssignments"].push_back(ipaddr);
|
||||
}
|
||||
|
||||
_memberChanged(empty, config, false);
|
||||
|
Reference in New Issue
Block a user