From e32d7d5abddb33ec1902909f60a0e654e5103a65 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 7 Mar 2014 10:45:32 +0000 Subject: MC convertor to be hidden until release git-svn-id: http://svn.miranda-ng.org/main/trunk@8441 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db3x_mmap/src/dbcontacts.cpp | 50 +++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 24 deletions(-) (limited to 'plugins/Db3x_mmap/src') diff --git a/plugins/Db3x_mmap/src/dbcontacts.cpp b/plugins/Db3x_mmap/src/dbcontacts.cpp index 0d16cefa0b..13a266f33d 100644 --- a/plugins/Db3x_mmap/src/dbcontacts.cpp +++ b/plugins/Db3x_mmap/src/dbcontacts.cpp @@ -451,31 +451,33 @@ void CDb3Mmap::FillContacts() dwOffset = p->ofsNext; } - for (int i = 0; i < arMetas.getCount(); i++) { - MCONTACT hContact = (MCONTACT)arMetas[i]; - DBCachedContact *ccMeta = m_cache->GetCachedContact(hContact); - if (ccMeta == NULL) - continue; - - // we don't need it anymore - DeleteContactSetting(hContact, META_PROTO, "MetaID"); - - for (int k = 0; k < ccMeta->nSubs; k++) { - // store contact id instead of the old mc number - DBCONTACTWRITESETTING dbws = { META_PROTO, "ParentMeta" }; - dbws.value.type = DBVT_DWORD; - dbws.value.dVal = hContact; - WriteContactSetting(ccMeta->pSubs[k], &dbws); - - // wipe out old data from subcontacts - DeleteContactSetting(ccMeta->pSubs[k], META_PROTO, "ContactNumber"); - DeleteContactSetting(ccMeta->pSubs[k], META_PROTO, "MetaLink"); - - DBCachedContact *ccSub = m_cache->GetCachedContact(ccMeta->pSubs[k]); - if (ccSub) - MetaMergeHistory(ccMeta, ccSub); + #if defined(_DEBUG) + for (int i = 0; i < arMetas.getCount(); i++) { + MCONTACT hContact = (MCONTACT)arMetas[i]; + DBCachedContact *ccMeta = m_cache->GetCachedContact(hContact); + if (ccMeta == NULL) + continue; + + // we don't need it anymore + DeleteContactSetting(hContact, META_PROTO, "MetaID"); + + for (int k = 0; k < ccMeta->nSubs; k++) { + // store contact id instead of the old mc number + DBCONTACTWRITESETTING dbws = { META_PROTO, "ParentMeta" }; + dbws.value.type = DBVT_DWORD; + dbws.value.dVal = hContact; + WriteContactSetting(ccMeta->pSubs[k], &dbws); + + // wipe out old data from subcontacts + DeleteContactSetting(ccMeta->pSubs[k], META_PROTO, "ContactNumber"); + DeleteContactSetting(ccMeta->pSubs[k], META_PROTO, "MetaLink"); + + DBCachedContact *ccSub = m_cache->GetCachedContact(ccMeta->pSubs[k]); + if (ccSub) + MetaMergeHistory(ccMeta, ccSub); + } } - } + #endif } DWORD CDb3Mmap::GetContactOffset(MCONTACT contactID) -- cgit v1.2.3