diff options
Diffstat (limited to 'plugins/Dbx_mmap_SA')
-rw-r--r-- | plugins/Dbx_mmap_SA/src/commonheaders.h | 2 | ||||
-rw-r--r-- | plugins/Dbx_mmap_SA/src/dbintf_sa.cpp | 3 | ||||
-rw-r--r-- | plugins/Dbx_mmap_SA/src/init.cpp | 2 | ||||
-rw-r--r-- | plugins/Dbx_mmap_SA/src/security.cpp | 2 |
4 files changed, 6 insertions, 3 deletions
diff --git a/plugins/Dbx_mmap_SA/src/commonheaders.h b/plugins/Dbx_mmap_SA/src/commonheaders.h index 710172c241..6f4aa0b4b3 100644 --- a/plugins/Dbx_mmap_SA/src/commonheaders.h +++ b/plugins/Dbx_mmap_SA/src/commonheaders.h @@ -86,7 +86,7 @@ INT_PTR CALLBACK DlgStdNewPass(HWND hDlg, UINT uMsg,WPARAM wParam,LPARAM lParam) INT_PTR CALLBACK DlgChangePass(HWND hDlg, UINT uMsg,WPARAM wParam,LPARAM lParam);
void xModifyMenu(HANDLE hMenu,long flags,const TCHAR* name, HICON hIcon);
-extern DBSignature dbSignature, dbSignatureSecured;
+extern DBSignature dbSignature, dbSignatureSecured, dbSignatureNonSecured;
extern LIST<CDdxMmapSA> g_Dbs;
diff --git a/plugins/Dbx_mmap_SA/src/dbintf_sa.cpp b/plugins/Dbx_mmap_SA/src/dbintf_sa.cpp index f3c68881a5..b7dec7c908 100644 --- a/plugins/Dbx_mmap_SA/src/dbintf_sa.cpp +++ b/plugins/Dbx_mmap_SA/src/dbintf_sa.cpp @@ -32,6 +32,7 @@ extern CDdxMmapSA* g_Db; int InitDialogs(void);
DBSignature dbSignatureSecured = {"Miranda ICQ SD",0x1A};
+DBSignature dbSignatureNonSecured = {"Miranda ICQ SA",0x1A};
CDdxMmapSA::CDdxMmapSA(const TCHAR* tszFileName) :
CDb3Mmap(tszFileName)
@@ -65,6 +66,8 @@ int CDdxMmapSA::CheckDbHeaders() {
if ( memcmp(m_dbHeader.signature, &dbSignatureSecured, sizeof(m_dbHeader.signature)) == 0)
m_bEncoding = true;
+ else if ( memcmp(m_dbHeader.signature, &dbSignatureNonSecured, sizeof(m_dbHeader.signature)) == 0)
+ m_bEncoding = false;
else {
m_bEncoding = false;
if ( memcmp(m_dbHeader.signature,&dbSignature,sizeof(m_dbHeader.signature)))
diff --git a/plugins/Dbx_mmap_SA/src/init.cpp b/plugins/Dbx_mmap_SA/src/init.cpp index cea82f5c79..77bf5dc953 100644 --- a/plugins/Dbx_mmap_SA/src/init.cpp +++ b/plugins/Dbx_mmap_SA/src/init.cpp @@ -53,7 +53,7 @@ static int makeDatabase(const TCHAR *profile) {
std::auto_ptr<CDdxMmapSA> db( new CDdxMmapSA(profile));
if (db->Create() == ERROR_SUCCESS) {
- db->CreateDbHeaders();
+ db->CreateDbHeaders(dbSignatureNonSecured);
return 0;
}
diff --git a/plugins/Dbx_mmap_SA/src/security.cpp b/plugins/Dbx_mmap_SA/src/security.cpp index 8731e86f81..260ab11727 100644 --- a/plugins/Dbx_mmap_SA/src/security.cpp +++ b/plugins/Dbx_mmap_SA/src/security.cpp @@ -233,7 +233,7 @@ void CDdxMmapSA::WritePlainHeader() {
DWORD bytesWritten;
- memcpy(m_dbHeader.signature, &dbSignature, sizeof(m_dbHeader.signature));
+ memcpy(m_dbHeader.signature, &dbSignatureNonSecured, sizeof(m_dbHeader.signature));
SetFilePointer(m_hDbFile,0,NULL,FILE_BEGIN);
WriteFile(m_hDbFile,m_dbHeader.signature,sizeof(m_dbHeader.signature),&bytesWritten,NULL);
|