From 07f395395b8fc82bf6609b3b5e8826c439fffd88 Mon Sep 17 00:00:00 2001 From: badaix Date: Sat, 3 Dec 2016 14:12:56 +0100 Subject: [PATCH] renamed ClientInfo::clientId to ClientInfo::id --- server/config.cpp | 6 +++--- server/config.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/server/config.cpp b/server/config.cpp index 9cd1e4da..703613a4 100644 --- a/server/config.cpp +++ b/server/config.cpp @@ -56,7 +56,7 @@ Config::Config() { GroupPtr group = make_shared(); group->fromJson(*it); -// if (client->clientId.empty() || getClientInfo(client->clientId)) +// if (client->id.empty() || getClientInfo(client->id)) // continue; groups.push_back(group); } @@ -95,7 +95,7 @@ ClientInfoPtr Config::getClientInfo(const std::string& clientId) const for (auto client: clients) { - if (client->clientId == clientId) + if (client->id == clientId) return client; } @@ -122,7 +122,7 @@ GroupPtr Config::getGroup(ClientInfoPtr client) { for (auto c: group->clients) { - if (c->clientId == client->clientId) + if (c->id == client->id) return group; } } diff --git a/server/config.h b/server/config.h index 4ab38aef..9028eeaf 100644 --- a/server/config.h +++ b/server/config.h @@ -216,7 +216,7 @@ struct Snapserver : public Snapcast struct ClientInfo { - ClientInfo(const std::string& _clientId = "") : clientId(_clientId), connected(false) + ClientInfo(const std::string& _clientId = "") : id(_clientId), connected(false) { lastSeen.tv_sec = 0; lastSeen.tv_usec = 0; @@ -225,7 +225,7 @@ struct ClientInfo void fromJson(const json& j) { host.fromJson(j["host"]); - clientId = jGet(j, "id", host.mac); + id = jGet(j, "id", host.mac); snapclient.fromJson(j["snapclient"]); config.fromJson(j["config"]); lastSeen.tv_sec = jGet(j["lastSeen"], "sec", 0); @@ -236,7 +236,7 @@ struct ClientInfo json toJson() { json j; - j["id"] = clientId; + j["id"] = id; j["host"] = host.toJson(); j["snapclient"] = snapclient.toJson(); j["config"] = config.toJson(); @@ -246,7 +246,7 @@ struct ClientInfo return j; } - std::string clientId; + std::string id; Host host; Snapclient snapclient; ClientConfig config;