summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src/dbevents.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-12-29 19:55:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-12-29 19:55:04 +0000
commit7e0c7c426f9c8a453deef09c3d6679824af5f3d5 (patch)
tree6e247cf898b38c430cf1924242177e91a02226a5 /plugins/Db3x_mmap/src/dbevents.cpp
parent5dbf04acc4094bdf762bbadb71b7ab6024e09dd5 (diff)
preparing mmap_sa, that it finally compatible with new mmap
git-svn-id: http://svn.miranda-ng.org/main/trunk@7415 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap/src/dbevents.cpp')
-rw-r--r--plugins/Db3x_mmap/src/dbevents.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/Db3x_mmap/src/dbevents.cpp b/plugins/Db3x_mmap/src/dbevents.cpp
index 7f9e55cdae..3399459539 100644
--- a/plugins/Db3x_mmap/src/dbevents.cpp
+++ b/plugins/Db3x_mmap/src/dbevents.cpp
@@ -123,7 +123,7 @@ STDMETHODIMP_(HANDLE) CDb3Base::AddEvent(HANDLE hContact, DBEVENTINFO *dbei)
DBWrite(ofsContact,&dbc,sizeof(DBContact));
DBWrite(ofsNew,&dbe,offsetof(DBEvent,blob));
- DBWrite(ofsNew+offsetof(DBEvent,blob),dbei->pBlob,dbei->cbBlob); // encode
+ EncodeDBWrite(ofsNew + offsetof(DBEvent, blob), dbei->pBlob, dbei->cbBlob); // encode
DBFlush(0);
lck.unlock();
@@ -243,10 +243,10 @@ STDMETHODIMP_(BOOL) CDb3Base::GetEvent(HANDLE hDbEvent, DBEVENTINFO *dbei)
if (bytesToCopy && dbei->pBlob) {
for (int i = 0;;i += MAXCACHEDREADSIZE) {
if (bytesToCopy-i <= MAXCACHEDREADSIZE) {
- MoveMemory(dbei->pBlob + i, DBRead(DWORD(hDbEvent) + offsetof(DBEvent, blob) + i, bytesToCopy - i, NULL), bytesToCopy - i); // decode
+ DecodeCopyMemory(dbei->pBlob + i, DBRead(DWORD(hDbEvent) + offsetof(DBEvent, blob) + i, bytesToCopy - i, NULL), bytesToCopy - i); // decode
break;
}
- MoveMemory(dbei->pBlob + i, DBRead(DWORD(hDbEvent) + offsetof(DBEvent, blob) + i, MAXCACHEDREADSIZE, NULL), MAXCACHEDREADSIZE); // decode
+ DecodeCopyMemory(dbei->pBlob + i, DBRead(DWORD(hDbEvent) + offsetof(DBEvent, blob) + i, MAXCACHEDREADSIZE, NULL), MAXCACHEDREADSIZE); // decode
}
}
return 0;