aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfusion32 <marcopuzziello@gmail.com>2025-10-16 00:47:01 -0300
committerfusion32 <marcopuzziello@gmail.com>2025-10-16 00:47:01 -0300
commit85b75f77376b5e6cf571bb6ebc34d11c167ca9cf (patch)
treea8ef508b1ba6eb85098d3c23f0b89250be1f8867
parentc3b333af90a39f38559de59762c8c1e247ffa2a3 (diff)
downloadquerymanager-85b75f77376b5e6cf571bb6ebc34d11c167ca9cf.tar.gz
querymanager-85b75f77376b5e6cf571bb6ebc34d11c167ca9cf.zip
make config.cfg a distribution template
-rw-r--r--.gitignore1
-rw-r--r--config.cfg.dist (renamed from config.cfg)21
-rw-r--r--src/database_postgres.cc2
-rw-r--r--src/querymanager.hh2
4 files changed, 13 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore
index e32b57d..eb6b658 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,5 +5,6 @@ build
local
*.log
*.db
+config.cfg
compile_commands.json
diff --git a/config.cfg b/config.cfg.dist
index e2c77d3..780c50a 100644
--- a/config.cfg
+++ b/config.cfg.dist
@@ -3,8 +3,8 @@ MaxCachedHostNames = 100
HostNameExpireTime = 30m
# SQLite Config
-#SQLite.File = "tibia.db"
-#SQLite.MaxCachedStatements = 100
+SQLite.File = "tibia.db"
+SQLite.MaxCachedStatements = 100
# PostgreSQL Config
# NOTE(fusion): These options are passed directly to `PQconnectdbParams`.
@@ -15,8 +15,7 @@ PostgreSQL.Host = "localhost"
PostgreSQL.Port = "5432"
PostgreSQL.DBName = "tibia"
PostgreSQL.User = "tibia"
-#PostgreSQL.Password = ""
-PostgreSQL.Password = "password"
+PostgreSQL.Password = ""
PostgreSQL.ConnectTimeout = ""
PostgreSQL.ClientEncoding = "UTF8"
PostgreSQL.ApplicationName = "QueryManager"
@@ -25,13 +24,13 @@ PostgreSQL.SSLRootCert = ""
PostgreSQL.MaxCachedStatements = 100
# MySQL/MariaDB Config
-#MySQL.Host = "localhost"
-#MySQL.Port = "3306"
-#MySQL.DBName = "tibia"
-#MySQL.User = "tibia"
-#MySQL.Password = ""
-#MySQL.UnixSocket = ""
-#MySQL.MaxCachedStatements = 100
+MySQL.Host = "localhost"
+MySQL.Port = "3306"
+MySQL.DBName = "tibia"
+MySQL.User = "tibia"
+MySQL.Password = ""
+MySQL.UnixSocket = ""
+MySQL.MaxCachedStatements = 100
# Connection Config
QueryManagerPort = 7173
diff --git a/src/database_postgres.cc b/src/database_postgres.cc
index 8cfc6ab..3c522c1 100644
--- a/src/database_postgres.cc
+++ b/src/database_postgres.cc
@@ -145,7 +145,7 @@ static void ParamBool(ParamBuffer *Params, bool Value){
if(Params->PreferredFormat == 1){ // BINARY FORMAT
uint8 Data = (Value ? 0x01 : 0x00);
InsertBinaryParam(Params, &Data, 1);
- }else{ // TEXT FORMAT
+ }else{
InsertTextParam(Params, (Value ? "TRUE" : "FALSE"));
}
}
diff --git a/src/querymanager.hh b/src/querymanager.hh
index a7108a6..46ea80d 100644
--- a/src/querymanager.hh
+++ b/src/querymanager.hh
@@ -642,7 +642,7 @@ public:
// String Buffer
//==============================================================================
-template<int N = KB(2)>
+template<int N>
struct StringBuffer{
private:
STATIC_ASSERT(N > 0);