From 31ac373a9c9eaac6463c1190628189e2539fc9ce Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 19 Jul 2012 08:16:39 +0000 Subject: cleanup for crit sections git-svn-id: http://svn.miranda-ng.org/main/trunk@1035 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db3x_mmap/dbcache.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'plugins/Db3x_mmap/dbcache.cpp') 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; -- cgit v1.2.3