mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
fixed amb1067 - SQL_SetAffinity crashed when targeting sqlite
This commit is contained in:
parent
a2e3f8682f
commit
f6276db4d0
@ -141,11 +141,13 @@ namespace SourceMod
|
||||
|
||||
struct DatabaseInfo
|
||||
{
|
||||
DatabaseInfo() : max_timeout(0) { };
|
||||
const char *host;
|
||||
const char *database;
|
||||
const char *user;
|
||||
const char *pass;
|
||||
unsigned int port;
|
||||
unsigned int max_timeout;
|
||||
};
|
||||
|
||||
class ISQLDriver
|
||||
@ -154,6 +156,8 @@ namespace SourceMod
|
||||
virtual ~ISQLDriver() { };
|
||||
public:
|
||||
virtual IDatabase *Connect(DatabaseInfo *info, int *errcode, char *error, size_t maxlength) =0;
|
||||
//Supports the timeout clause
|
||||
virtual IDatabase *Connect2(DatabaseInfo *info, int *errcode, char *error, size_t maxlength) =0;
|
||||
virtual const char *NameString() =0;
|
||||
virtual bool IsCompatDriver(const char *namestring) =0;
|
||||
};
|
||||
|
@ -35,6 +35,10 @@ int busy_handler(void *unused1, int unused2)
|
||||
|
||||
return 1;
|
||||
}
|
||||
IDatabase *SqliteDriver::Connect2(DatabaseInfo *info, int *errcode, char *error, size_t maxlength)
|
||||
{
|
||||
return Connect(info, errcode, error, maxlength);
|
||||
}
|
||||
|
||||
IDatabase *SqliteDriver::Connect(DatabaseInfo *info, int *errcode, char *error, size_t maxlength)
|
||||
{
|
||||
|
@ -9,6 +9,7 @@ namespace SourceMod
|
||||
{
|
||||
public:
|
||||
IDatabase *Connect(DatabaseInfo *info, int *errcode, char *error, size_t maxlength);
|
||||
IDatabase *Connect2(DatabaseInfo *info, int *errcode, char *error, size_t maxlength);
|
||||
const char *NameString();
|
||||
bool IsCompatDriver(const char *namestr);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user