diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Db3x/db3x_10.vcxproj | 8 | ||||
-rw-r--r-- | plugins/Db3x/src/dbintf3x.h | 4 | ||||
-rw-r--r-- | plugins/Db3x_mmap/src/dbintf.h | 2 | ||||
-rw-r--r-- | plugins/Db3x_mmap/src/dbsettings.cpp | 3 |
4 files changed, 10 insertions, 7 deletions
diff --git a/plugins/Db3x/db3x_10.vcxproj b/plugins/Db3x/db3x_10.vcxproj index 68f34fdd90..ca0c4a5cbd 100644 --- a/plugins/Db3x/db3x_10.vcxproj +++ b/plugins/Db3x/db3x_10.vcxproj @@ -73,7 +73,7 @@ <ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;DB3X;DB3X_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>false</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -104,7 +104,7 @@ <ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;DB3X;DB3X_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>false</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -136,7 +136,7 @@ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DB3X;DB3X_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -170,7 +170,7 @@ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;DB3X;DB3X_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
<BufferSecurityCheck>false</BufferSecurityCheck>
diff --git a/plugins/Db3x/src/dbintf3x.h b/plugins/Db3x/src/dbintf3x.h index 74dad4c4a8..e0d5a28323 100644 --- a/plugins/Db3x/src/dbintf3x.h +++ b/plugins/Db3x/src/dbintf3x.h @@ -40,6 +40,8 @@ struct CDb3x : public CDb3Base protected:
virtual DWORD GetSettingsGroupOfsByModuleNameOfs(DBContact *dbc,DWORD ofsContact,DWORD ofsModuleName);
+ virtual void InvalidateSettingsGroupOfsCacheEntry(DWORD ofsSettingsGroup);
+
virtual void DBMoveChunk(DWORD ofsDest, DWORD ofsSource, int bytes);
virtual PBYTE DBRead(DWORD ofs, int bytesRequired, int *bytesAvail);
virtual void DBWrite(DWORD ofs, PVOID pData, int bytes);
@@ -69,6 +71,4 @@ protected: int FindLRUSection(void);
void LoadSection(const int i,DWORD ofs);
void MoveSection(int *sectId,int dest);
-
- void InvalidateSettingsGroupOfsCacheEntry(DWORD ofsSettingsGroup);
};
diff --git a/plugins/Db3x_mmap/src/dbintf.h b/plugins/Db3x_mmap/src/dbintf.h index e77658767e..2aa1ceea73 100644 --- a/plugins/Db3x_mmap/src/dbintf.h +++ b/plugins/Db3x_mmap/src/dbintf.h @@ -206,6 +206,8 @@ protected: protected:
virtual DWORD GetSettingsGroupOfsByModuleNameOfs(DBContact *dbc,DWORD ofsContact,DWORD ofsModuleName) = 0;
+ virtual void InvalidateSettingsGroupOfsCacheEntry(DWORD ofsSettingsGroup) {}
+
virtual void DBMoveChunk(DWORD ofsDest, DWORD ofsSource, int bytes) = 0;
virtual PBYTE DBRead(DWORD ofs, int bytesRequired, int *bytesAvail) = 0;
virtual void DBWrite(DWORD ofs, PVOID pData, int bytes) = 0;
diff --git a/plugins/Db3x_mmap/src/dbsettings.cpp b/plugins/Db3x_mmap/src/dbsettings.cpp index 4f3a2e5516..4a92bf7d4a 100644 --- a/plugins/Db3x_mmap/src/dbsettings.cpp +++ b/plugins/Db3x_mmap/src/dbsettings.cpp @@ -612,7 +612,7 @@ STDMETHODIMP_(BOOL) CDb3Base::WriteContactSetting(HANDLE hContact, DBCONTACTWRIT //make sure the module group exists
ofsSettingsGroup = GetSettingsGroupOfsByModuleNameOfs(&dbc,ofsContact,ofsModuleName);
if (ofsSettingsGroup == 0) { //module group didn't exist - make it
- if (tmp.value.type&DBVTF_VARIABLELENGTH) {
+ if (tmp.value.type & DBVTF_VARIABLELENGTH) {
if (tmp.value.type == DBVT_ASCIIZ || tmp.value.type == DBVT_UTF8) bytesRequired = (int)strlen(tmp.value.pszVal)+2;
else if (tmp.value.type == DBVT_BLOB) bytesRequired = tmp.value.cpbVal+2;
}
@@ -705,6 +705,7 @@ STDMETHODIMP_(BOOL) CDb3Base::WriteContactSetting(HANDLE hContact, DBCONTACTWRIT DBContactSettings *dbcsPrev;
DWORD ofsDbcsPrev,ofsNew;
+ InvalidateSettingsGroupOfsCacheEntry(ofsSettingsGroup);
bytesRequired += (DB_SETTINGS_RESIZE_GRANULARITY-(bytesRequired%DB_SETTINGS_RESIZE_GRANULARITY))%DB_SETTINGS_RESIZE_GRANULARITY;
//find previous group to change its offset
ofsDbcsPrev = dbc.ofsFirstSettings;
|