CLuaFile::CLuaFile() { MySQLInit(); //start mysql thread m_MySQLConnected = false; m_IncrementalQueryId = 0; m_pLua = 0; m_pLuaHandler = 0; m_pServer = 0; Close(); }
void MySQLCheckConnection() { if (!enabled) return; if (connected) { if (mysql_ping(mysqlcon) == 0) { connected = true; return; } else { connected = false; dprintf("MySQL connection dropped. Attempting Reconnect."); MySQLInit(); } } else MySQLInit(); }