diff --git a/client/snapclient.cpp b/client/snapclient.cpp index bdb073be..f49d4d4b 100644 --- a/client/snapclient.cpp +++ b/client/snapclient.cpp @@ -63,7 +63,8 @@ using namespace std::chrono_literals; static constexpr auto LOG_TAG = "Snapclient"; - +namespace +{ PcmDevice getPcmDevice(const std::string& player, const std::string& parameter, const std::string& soundcard) { LOG(DEBUG, LOG_TAG) << "Trying to get PCM device for player: " << player << ", parameter: " << ", card: " << soundcard << "\n"; @@ -104,6 +105,7 @@ PcmDevice getPcmDevice(const std::string& player, const std::string& parameter, pcm_device.name = soundcard; return pcm_device; } +} // namespace #ifdef WINDOWS // hack to avoid case destinction in the signal handler diff --git a/server/control_requests.hpp b/server/control_requests.hpp index d2b8b2a2..43adacb8 100644 --- a/server/control_requests.hpp +++ b/server/control_requests.hpp @@ -53,6 +53,7 @@ public: null, ///< null }; + /// @return the string representation of @p type std::string toString(Type type) { switch (type) diff --git a/server/server.cpp b/server/server.cpp index a3424ddd..348d0958 100644 --- a/server/server.cpp +++ b/server/server.cpp @@ -331,8 +331,7 @@ void Server::onMessageReceived(const std::shared_ptr& streamSessi LOG(ERROR, LOG_TAG) << "Authentication required\n"; error_msg = make_shared(401, "Unauthorized", ec ? ec.detailed_message() : "Authentication required"); } - - if (!streamSession->authinfo.hasPermission("Streaming")) + else if (!streamSession->authinfo.hasPermission("Streaming")) { std::string error = "Permission 'Streaming' missing"; LOG(ERROR, LOG_TAG) << error << "\n";