mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-28 08:26:16 +02:00
consider clients as offline after server start
This commit is contained in:
parent
05c8107203
commit
a221e431aa
2 changed files with 1 additions and 20 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue