consider clients as offline after server start

This commit is contained in:
badaix 2015-09-12 19:25:20 +02:00
parent 05c8107203
commit a221e431aa
2 changed files with 1 additions and 20 deletions

View file

@ -42,12 +42,11 @@ Config::Config()
{
ClientInfoPtr client = make_shared<ClientInfo>();
client->fromJson(*it);
client->connected = false;
clients.push_back(client);
std::cout << "Client:\n" << std::setw(4) << client->toJson() << '\n';
}
}
// fs::create_directory(filename_.parent_path());
}
@ -62,22 +61,6 @@ void Config::save()
}
void Config::test()
{
ifstream ifs("snapserver.json", std::ifstream::in);
json j;
ifs >> j;
std::cout << std::setw(4) << j << std::endl;
json j1 = j["Client"];
for (json::iterator it = j1.begin(); it != j1.end(); ++it)
{
ClientInfo client;
client.fromJson(*it);
std::cout << "Client:\n" << std::setw(4) << client.toJson() << '\n';
}
}
ClientInfoPtr Config::getClientInfo(const std::string& macAddress, bool add)
{
if (macAddress.empty())