added Volume struct

This commit is contained in:
badaix 2015-09-02 18:44:09 +02:00
parent e5698d8ab1
commit 7ebefd85a4
2 changed files with 38 additions and 6 deletions

View file

@ -44,14 +44,20 @@ void Config::test()
}
ClientInfoPtr Config::getClientInfo(const std::string& macAddress)
ClientInfoPtr Config::getClientInfo(const std::string& macAddress, bool add)
{
if (macAddress.empty())
return nullptr;
for (auto client: clients)
{
if (client->macAddress == macAddress)
return client;
}
if (!add)
return nullptr;
ClientInfoPtr client = make_shared<ClientInfo>(macAddress);
clients.push_back(client);