fixed amb893, closing a timer handle wouldn't kill the timer properly
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401403
This commit is contained in:
parent
7a02c6b9c2
commit
20350108ac
@ -82,7 +82,9 @@ TimerNatives::~TimerNatives()
|
||||
void TimerNatives::OnSourceModAllInitialized()
|
||||
{
|
||||
HandleAccess sec;
|
||||
sec.access[HandleAccess_Clone] |= HANDLE_RESTRICT_IDENTITY;
|
||||
|
||||
g_HandleSys.InitAccessDefaults(NULL, &sec);
|
||||
sec.access[HandleAccess_Clone] = HANDLE_RESTRICT_IDENTITY;
|
||||
|
||||
g_TimerType = g_HandleSys.CreateType("Timer", this, 0, NULL, &sec, g_pCoreIdent, NULL);
|
||||
}
|
||||
@ -230,7 +232,7 @@ static cell_t smn_TriggerTimer(IPluginContext *pCtx, const cell_t *params)
|
||||
HandleSecurity sec;
|
||||
TimerInfo *pInfo;
|
||||
|
||||
sec.pOwner = NULL;
|
||||
sec.pOwner = pCtx->GetIdentity();
|
||||
sec.pIdentity = g_pCoreIdent;
|
||||
|
||||
if ((herr=g_HandleSys.ReadHandle(hndl, g_TimerType, &sec, (void **)&pInfo))
|
||||
|
@ -79,7 +79,9 @@ UsrMessageNatives::~UsrMessageNatives()
|
||||
void UsrMessageNatives::OnSourceModAllInitialized()
|
||||
{
|
||||
HandleAccess sec;
|
||||
sec.access[HandleAccess_Delete] |= HANDLE_RESTRICT_IDENTITY;
|
||||
|
||||
g_HandleSys.InitAccessDefaults(NULL, &sec);
|
||||
sec.access[HandleAccess_Delete] = HANDLE_RESTRICT_IDENTITY;
|
||||
|
||||
g_WrBitBufType = g_HandleSys.CreateType("BitBufWriter", this, 0, NULL, NULL, g_pCoreIdent, NULL);
|
||||
g_RdBitBufType = g_HandleSys.CreateType("BitBufReader", this, 0, NULL, &sec, g_pCoreIdent, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user