Fix communication error between cores #36

Merged
Exynox merged 2 commits from nightly into master 2024-11-17 09:22:45 +02:00
Showing only changes of commit 0f259307df - Show all commits

View File

@ -132,6 +132,14 @@ bool CAsyncSQL::Connect()
} }
} }
// Disable MYSQL_OPT_SSL_VERIFY_SERVER_CERT (enabled by default in libmariadb >=3.4)
bool verifyServerCert = false;
if (mysql_options(&m_hDB, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, &verifyServerCert) != 0)
{
SPDLOG_ERROR("Disabling MYSQL_OPT_SSL_VERIFY_SERVER_CERT failed: {}", mysql_error(&m_hDB));
return false;
}
if (!mysql_real_connect(&m_hDB, m_stHost.c_str(), m_stUser.c_str(), m_stPassword.c_str(), m_stDB.c_str(), m_iPort, NULL, CLIENT_MULTI_STATEMENTS)) if (!mysql_real_connect(&m_hDB, m_stHost.c_str(), m_stUser.c_str(), m_stPassword.c_str(), m_stDB.c_str(), m_iPort, NULL, CLIENT_MULTI_STATEMENTS))
{ {
SPDLOG_ERROR("MySQL connection failed: {}", mysql_error(&m_hDB)); SPDLOG_ERROR("MySQL connection failed: {}", mysql_error(&m_hDB));