diff --git a/server/src/client/web/WebClient.cpp b/server/src/client/web/WebClient.cpp index 1c22758..a39397c 100644 --- a/server/src/client/web/WebClient.cpp +++ b/server/src/client/web/WebClient.cpp @@ -86,8 +86,8 @@ void WebClient::initialize() { } }; - this->ws_handler.on_connect = bind(&WebClient::onWSConnected, this); - this->ws_handler.on_disconnect = bind(&WebClient::onWSDisconnected, this, placeholders::_1); + this->ws_handler.on_connect = std::bind(&WebClient::onWSConnected, this); + this->ws_handler.on_disconnect = std::bind(&WebClient::onWSDisconnected, this, placeholders::_1); this->ws_handler.callback_data([&](const pipes::WSMessage& msg){ this->onWSMessage(msg); diff --git a/server/src/manager/SqlDataManager.cpp b/server/src/manager/SqlDataManager.cpp index 2483cdd..7995d8c 100644 --- a/server/src/manager/SqlDataManager.cpp +++ b/server/src/manager/SqlDataManager.cpp @@ -191,10 +191,12 @@ bool SqlDataManager::initialize(std::string& error) { return false; } - res = sql::command{this->sql(), "DELETE FROM `general` WHERE `id` IN (SELECT `id` FROM `general` WHERE `key` = :key ORDER BY `key` LIMIT 1, -1);", variable{":key", "lock_test"}}.execute(); - if(!res) { - error = res.fmtStr(); - return false; + if(this->sql()->getType() == sql::TYPE_SQLITE) { + res = sql::command{this->sql(), "DELETE FROM `general` WHERE `id` IN (SELECT `id` FROM `general` WHERE `key` = :key ORDER BY `key` LIMIT 1, -1);", variable{":key", "lock_test"}}.execute(); + if(!res) { + error = res.fmtStr(); + return false; + } } }