mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
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)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user