mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-04 22:56:37 +00:00
Migrate shared memory to use content database source; add logic in DB::core to prevent double freeing [skip ci]
This commit is contained in:
+4
-6
@@ -13,9 +13,6 @@
|
||||
#include <mysql.h>
|
||||
#include <string.h>
|
||||
|
||||
const int8 DATABASE_CONNECTION_DEFAULT = 0;
|
||||
const int8 DATABASE_CONNECTION_CONTENT = 1;
|
||||
|
||||
class DBcore {
|
||||
public:
|
||||
enum eStatus {
|
||||
@@ -35,8 +32,8 @@ public:
|
||||
MYSQL *getMySQL() { return &mysql; }
|
||||
void SetMysql(MYSQL *mysql);
|
||||
|
||||
int8 GetConnectionType() const;
|
||||
void SetConnectionType(int8 connection_type);
|
||||
const std::string &GetOriginHost() const;
|
||||
void SetOriginHost(const std::string &origin_host);
|
||||
|
||||
protected:
|
||||
bool Open(
|
||||
@@ -54,11 +51,12 @@ protected:
|
||||
private:
|
||||
bool Open(uint32 *errnum = nullptr, char *errbuf = nullptr);
|
||||
|
||||
int8 connection_type;
|
||||
MYSQL mysql;
|
||||
Mutex MDatabase;
|
||||
eStatus pStatus;
|
||||
|
||||
std::string origin_host;
|
||||
|
||||
char *pHost;
|
||||
char *pUser;
|
||||
char *pPassword;
|
||||
|
||||
Reference in New Issue
Block a user