summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src/dbcache.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-12 18:37:37 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-12 18:37:37 +0000
commitc48cb57ce96c52350077b6710422fb072bd9f276 (patch)
tree01ddc1a0757301716a64a1eb043a9cb9edbe4e01 /plugins/Db3x_mmap/src/dbcache.cpp
parent744158b569eb5c888644069c03f01463bc632c34 (diff)
enchanced database logging
git-svn-id: http://svn.miranda-ng.org/main/trunk@2300 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap/src/dbcache.cpp')
-rw-r--r--plugins/Db3x_mmap/src/dbcache.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/Db3x_mmap/src/dbcache.cpp b/plugins/Db3x_mmap/src/dbcache.cpp
index 4e09335bae..a107b502ef 100644
--- a/plugins/Db3x_mmap/src/dbcache.cpp
+++ b/plugins/Db3x_mmap/src/dbcache.cpp
@@ -67,7 +67,7 @@ void CDb3Mmap::ReMap(DWORD needed)
void CDb3Mmap::DBMoveChunk(DWORD ofsDest,DWORD ofsSource,int bytes)
{
int x = 0;
- log3("move %d %08x->%08x",bytes,ofsSource,ofsDest);
+ //log3("move %d %08x->%08x",bytes,ofsSource,ofsDest);
if (ofsDest+bytes > m_dwFileSize) ReMap(ofsDest+bytes-m_dwFileSize);
if (ofsSource+bytes > m_dwFileSize) {
x = ofsSource+bytes-m_dwFileSize;
@@ -86,11 +86,11 @@ PBYTE CDb3Mmap::DBRead(DWORD ofs,int bytesRequired,int *bytesAvail)
{
// buggy read
if (ofs>= m_dwFileSize) {
- log2("read from outside %d@%08x",bytesRequired,ofs);
+ //log2("read from outside %d@%08x",bytesRequired,ofs);
if (bytesAvail != NULL) *bytesAvail = m_ChunkSize;
return m_pNull;
}
- log3((ofs+bytesRequired > m_dwFileSize)?"read %d@%08x, only %d avaliable":"read %d@%08x",bytesRequired,ofs,m_dwFileSize-ofs);
+ //log3((ofs+bytesRequired > m_dwFileSize)?"read %d@%08x, only %d avaliable":"read %d@%08x",bytesRequired,ofs,m_dwFileSize-ofs);
if (bytesAvail != NULL) *bytesAvail = m_dwFileSize - ofs;
return m_pDbCache+ofs;
}
@@ -98,7 +98,7 @@ PBYTE CDb3Mmap::DBRead(DWORD ofs,int bytesRequired,int *bytesAvail)
//we are assumed to be in a mutex here
void CDb3Mmap::DBWrite(DWORD ofs,PVOID pData,int bytes)
{
- log2("write %d@%08x",bytes,ofs);
+ //log2("write %d@%08x",bytes,ofs);
if (ofs+bytes > m_dwFileSize) ReMap(ofs+bytes-m_dwFileSize);
MoveMemory(m_pDbCache+ofs,pData,bytes);
logg();
@@ -107,7 +107,7 @@ void CDb3Mmap::DBWrite(DWORD ofs,PVOID pData,int bytes)
//we are assumed to be in a mutex here
void CDb3Mmap::DBFill(DWORD ofs,int bytes)
{
- log2("zerofill %d@%08x",bytes,ofs);
+ //log2("zerofill %d@%08x",bytes,ofs);
if (ofs+bytes <= m_dwFileSize)
ZeroMemory(m_pDbCache+ofs,bytes);
logg();