Database now runs on linux

This commit is contained in:
2022-03-05 19:59:39 +02:00
parent f4f90b2533
commit 90ef09c331
131 changed files with 467 additions and 446 deletions

View File

@@ -19,7 +19,7 @@ void CClientManager::LoadEventFlag()
while ((row = mysql_fetch_row(pRes->pSQLResult)))
{
TPacketSetEventFlag p;
strlcpy(p.szFlagName, row[0], sizeof(p.szFlagName));
strncpy(p.szFlagName, row[0], sizeof(p.szFlagName));
str_to_number(p.lValue, row[1]);
sys_log(0, "EventFlag Load %s %d", p.szFlagName, p.lValue);
m_map_lEventFlag.insert(std::make_pair(std::string(p.szFlagName), p.lValue));
@@ -68,7 +68,7 @@ void CClientManager::SendEventFlagsOnSetup(CPeer* peer)
for (it = m_map_lEventFlag.begin(); it != m_map_lEventFlag.end(); ++it)
{
TPacketSetEventFlag p;
strlcpy(p.szFlagName, it->first.c_str(), sizeof(p.szFlagName));
strncpy(p.szFlagName, it->first.c_str(), sizeof(p.szFlagName));
p.lValue = it->second;
peer->EncodeHeader(HEADER_DG_SET_EVENT_FLAG, 0, sizeof(TPacketSetEventFlag));
peer->Encode(&p, sizeof(TPacketSetEventFlag));