added further error logging for timer closing
authorBorja Ferrer <faluco@alliedmods.net>
Sun Nov 11 20:40:08 2007 +0000 (2007-11-11)
changeset 1674cd474b45a045
parent 1673 a3674bdc4672
child 1675 170ffea426a0
child 1676 df6b4e53cca0
added further error logging for timer closing
core/smn_timers.cpp
     1.1 --- a/core/smn_timers.cpp	Sun Nov 11 06:50:50 2007 +0000
     1.2 +++ b/core/smn_timers.cpp	Sun Nov 11 20:40:08 2007 +0000
     1.3 @@ -31,6 +31,7 @@
     1.4  
     1.5  #include "HandleSys.h"
     1.6  #include "TimerSys.h"
     1.7 +#include "PluginSys.h"
     1.8  #include "Logger.h"
     1.9  
    1.10  #define TIMER_HNDL_CLOSE	(1<<9)
    1.11 @@ -153,7 +154,14 @@
    1.12  		}
    1.13  	}
    1.14  
    1.15 -	g_HandleSys.FreeHandle(pInfo->TimerHandle, &sec);
    1.16 +	if ((herr=g_HandleSys.FreeHandle(pInfo->TimerHandle, &sec)) != HandleError_None)
    1.17 +	{
    1.18 +		g_Logger.LogError("Invalid timer handle %x (error %d) on plugin %s during timer end", 
    1.19 +							pInfo->TimerHandle, 
    1.20 +							herr, 
    1.21 +							g_PluginSys.FindPluginByContext(pInfo->pContext->GetContext())->GetFilename());
    1.22 +		return;
    1.23 +	}
    1.24  	DeleteTimerInfo(pInfo);
    1.25  }
    1.26