summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/dbcache.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-19 08:16:39 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-19 08:16:39 +0000
commit31ac373a9c9eaac6463c1190628189e2539fc9ce (patch)
treec23535fb0304e50119ffb49c3cd8f6536d640e3c /plugins/Db3x_mmap/dbcache.cpp
parentf45207c731e8d472f57143fb3d152a06ee7bd1f0 (diff)
cleanup for crit sections
git-svn-id: http://svn.miranda-ng.org/main/trunk@1035 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap/dbcache.cpp')
-rw-r--r--plugins/Db3x_mmap/dbcache.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/plugins/Db3x_mmap/dbcache.cpp b/plugins/Db3x_mmap/dbcache.cpp
index 1e9369cc85..271de9d512 100644
--- a/plugins/Db3x_mmap/dbcache.cpp
+++ b/plugins/Db3x_mmap/dbcache.cpp
@@ -134,7 +134,7 @@ static VOID CALLBACK DoBufferFlushTimerProc(HWND hwnd, UINT message, UINT_PTR id
if (FlushViewOfFile(pDbCache, 0) == 0) {
if (flushFailTick == 0)
flushFailTick = GetTickCount();
- else if (GetTickCount() - flushFailTick > 5000)
+ else if (GetTickCount() - flushFailTick > 5000)
DatabaseCorruption(NULL);
}
else
@@ -150,7 +150,7 @@ void DBFlush(int setting)
if (FlushViewOfFile(pDbCache, 0) == 0) {
if (flushFailTick == 0)
flushFailTick = GetTickCount();
- else if (GetTickCount() - flushFailTick > 5000)
+ else if (GetTickCount() - flushFailTick > 5000)
DatabaseCorruption(NULL);
}
else
@@ -163,15 +163,6 @@ void DBFlush(int setting)
flushBuffersTimerId = SetTimer(NULL,flushBuffersTimerId,50,DoBufferFlushTimerProc);
}
-static INT_PTR CacheSetSafetyMode(WPARAM wParam,LPARAM lParam)
-{
- EnterCriticalSection(&csDbAccess);
- safetyMode = wParam;
- LeaveCriticalSection(&csDbAccess);
- DBFlush(1);
- return 0;
-}
-
int InitCache(void)
{
DWORD x;