📄 pgprpcpwdcache.c
字号:
/*____________________________________________________________________________
Copyright (C) 2002 PGP Corporation
All rights reserved.
$Id: pgpRPCPwdCache.c,v 1.9 2002/08/06 20:11:21 dallen Exp $
____________________________________________________________________________*/
#include <windows.h>
#include "pgpPubTypes.h"
#include "pgpRPCMsg.h"
#include "pgpPassCach.h"
#include "pgpKeyPriv.h"
#include "pgpThreads.h"
#define CACHETIME 10000
#define TOKENTIME 5000
extern PGPMutex_t sRpcMutex;
extern PGPContextRef gCtx;
void
pgpRPCThread(void *dummy)
{
int count = 0;
for(;;) {
SleepEx( TOKENTIME, FALSE );
PGPMutexLock( &sRpcMutex );
pgpPollTokens( gCtx );
PGPMutexUnlock( &sRpcMutex );
if( ++count >= (CACHETIME/TOKENTIME) )
{
pgpExpirePassphraseCache( gCtx );
PGPMutexLock( &sRpcMutex );
pgpExpireKeyDBCache( gCtx );
PGPMutexUnlock( &sRpcMutex );
count = 0;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -