mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
WebSocketServer: Store debug setting
This commit is contained in:
parent
3ac0f0edee
commit
1cee256cb3
@ -79,12 +79,13 @@ void WebSocketServer::Start()
|
||||
}
|
||||
|
||||
_serverPort = conf->ServerPort;
|
||||
_debugEnabled = conf->DebugEnabled;
|
||||
_authenticationRequired = conf->AuthRequired;
|
||||
_authenticationSalt = Utils::Crypto::GenerateSalt();
|
||||
_authenticationSecret = Utils::Crypto::GenerateSecret(conf->ServerPassword.toStdString(), _authenticationSalt);
|
||||
|
||||
// Set log levels if debug is enabled
|
||||
if (conf->DebugEnabled) {
|
||||
if (_debugEnabled) {
|
||||
_server.get_alog().set_channels(websocketpp::log::alevel::all);
|
||||
_server.get_alog().clear_channels(websocketpp::log::alevel::frame_header | websocketpp::log::alevel::frame_payload | websocketpp::log::alevel::control);
|
||||
_server.get_elog().set_channels(websocketpp::log::elevel::all);
|
||||
|
@ -89,6 +89,7 @@ class WebSocketServer : QObject
|
||||
std::mutex _sessionMutex;
|
||||
std::map<websocketpp::connection_hdl, WebSocketSession, std::owner_less<websocketpp::connection_hdl>> _sessions;
|
||||
uint16_t _serverPort;
|
||||
bool _debugEnabled;
|
||||
bool _authenticationRequired;
|
||||
std::string _authenticationSecret;
|
||||
std::string _authenticationSalt;
|
||||
|
Loading…
Reference in New Issue
Block a user