linux memtest support
This commit is contained in:
parent
b9b2a2581e
commit
c3661e8bb3
|
@ -162,7 +162,6 @@ int C_InconsistentFile( const edict_t *player, const char *filename, char *disco
|
||||||
|
|
||||||
if ( MDLL_InconsistentFile(player,filename,disconnect_message) )
|
if ( MDLL_InconsistentFile(player,filename,disconnect_message) )
|
||||||
{
|
{
|
||||||
cell ret = 0;
|
|
||||||
CPlayer *pPlayer = GET_PLAYER_POINTER((edict_t *)player);
|
CPlayer *pPlayer = GET_PLAYER_POINTER((edict_t *)player);
|
||||||
|
|
||||||
#ifdef ENABLEEXEPTIONS
|
#ifdef ENABLEEXEPTIONS
|
||||||
|
@ -677,12 +676,22 @@ void C_StartFrame_Post( void ) {
|
||||||
time(&td);
|
time(&td);
|
||||||
tm *curTime = localtime(&td);
|
tm *curTime = localtime(&td);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
#ifdef __linux__
|
||||||
|
mkdir(build_pathname("%s/memreports", get_localinfo("amxx_basedir", "addons/amxx")), 0700);
|
||||||
|
#else
|
||||||
mkdir(build_pathname("%s/memreports", get_localinfo("amxx_basedir", "addons/amxx")));
|
mkdir(build_pathname("%s/memreports", get_localinfo("amxx_basedir", "addons/amxx")));
|
||||||
|
#endif
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
char buffer[256];
|
char buffer[256];
|
||||||
sprintf(buffer, "%s/memreports/D%02d%02d%03d", get_localinfo("amxx_basedir", "addons/amxx"), curTime->tm_mon + 1, curTime->tm_mday, i);
|
sprintf(buffer, "%s/memreports/D%02d%02d%03d", get_localinfo("amxx_basedir", "addons/amxx"), curTime->tm_mon + 1, curTime->tm_mday, i);
|
||||||
|
#ifdef __linux__
|
||||||
|
mkdir(build_pathname("%s", g_log_dir.str()), 0700);
|
||||||
|
if (mkdir(build_pathname(buffer), 0700) < 0)
|
||||||
|
#else
|
||||||
|
mkdir(build_pathname("%s", g_log_dir.str()));
|
||||||
if (mkdir(build_pathname(buffer)) < 0)
|
if (mkdir(build_pathname(buffer)) < 0)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (errno == EEXIST)
|
if (errno == EEXIST)
|
||||||
{
|
{
|
||||||
|
@ -1244,4 +1253,4 @@ NEW_DLL_FUNCTIONS gNewDLLFunctionTable_Post;
|
||||||
C_DLLEXPORT int GetNewDLLFunctions_Post(NEW_DLL_FUNCTIONS *pNewFunctionTable, int *interfaceVersion)
|
C_DLLEXPORT int GetNewDLLFunctions_Post(NEW_DLL_FUNCTIONS *pNewFunctionTable, int *interfaceVersion)
|
||||||
{
|
{
|
||||||
return g_FakeMeta.GetNewDLLFunctions_Post(pNewFunctionTable, interfaceVersion, &gNewDLLFunctionTable_Post);
|
return g_FakeMeta.GetNewDLLFunctions_Post(pNewFunctionTable, interfaceVersion, &gNewDLLFunctionTable_Post);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user