More fun with dupes
This commit is contained in:
parent
e702942041
commit
f6026f94a5
2 changed files with 10 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue