From 8c2a8461db64e92ac09f202589009ee05c69626d Mon Sep 17 00:00:00 2001 From: fusion32 Date: Tue, 18 Nov 2025 15:17:29 -0300 Subject: fix problem with connection input + allow login server to query worlds There was a small problem with how we computed the size of the packet "header". It was unlikely to manifest tho, because it's at the beginning of a TCP message and TCP segments aren't that small, unless the whole message is that small. I'm also allowing login servers to query for world information to allow a basic form of `STATUS` to be implemented. --- src/querymanager.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/querymanager.cc') diff --git a/src/querymanager.cc b/src/querymanager.cc index 1c638b2..e4a05b8 100644 --- a/src/querymanager.cc +++ b/src/querymanager.cc @@ -240,7 +240,7 @@ bool StringFormat(char *Dest, int DestCapacity, const char *Format, ...){ } bool StringFormatTime(char *Dest, int DestCapacity, const char *Format, int Timestamp){ - struct tm tm = GetLocalTime((int)Timestamp); + struct tm tm = GetLocalTime((time_t)Timestamp); int Result = (int)strftime(Dest, DestCapacity, Format, &tm); // NOTE(fusion): `strftime` will return ZERO if it's unable to fit the result @@ -801,7 +801,7 @@ int main(int argc, const char **argv){ g_Config.MariaDB.MaxCachedStatements = 100; // Connection Config - g_Config.QueryManagerPort = 7174; + g_Config.QueryManagerPort = 7173; StringBufCopy(g_Config.QueryManagerPassword, ""); g_Config.QueryWorkerThreads = 1; g_Config.QueryBufferSize = (int)MB(1); -- cgit v1.2.3