From fedcd0462671c913f1b36e2111b3a5c8161f2b3e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 20 Nov 2012 09:45:33 +0000 Subject: fix for the endless recursion in uinfoex git-svn-id: http://svn.miranda-ng.org/main/trunk@2387 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- .../src/ex_import/classExImContactBase.cpp | 2 +- .../src/ex_import/classExImContactXML.cpp | 34 +++++++++------------- 2 files changed, 14 insertions(+), 22 deletions(-) (limited to 'plugins/UserInfoEx/src/ex_import') diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp index 537fb0d8c8..d2474d2ac0 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp @@ -524,7 +524,7 @@ BOOLEAN CExImContactBase::isHandle(HANDLE hContact) // compare protocols pszProto = DB::Contact::Proto(hContact); - if (pszProto == NULL || (INT_PTR)pszProto == CALLSERVICE_NOTFOUND || mir_stricmp(pszProto, _pszProto)) + if (pszProto == NULL || (INT_PTR)pszProto == CALLSERVICE_NOTFOUND || lstrcmpA(pszProto, _pszProto)) return FALSE; // compare uids diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp index 0f29f08c25..faa5478d61 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp @@ -198,26 +198,17 @@ TiXmlElement* CExImContactXML::CreateXmlElement() **/ INT CExImContactXML::ExportContact(DB::CEnumList* pModules) { - if (_pXmlFile->_wExport & EXPORT_DATA) - { - if (pModules) - { + if (_pXmlFile->_wExport & EXPORT_DATA) { + if (pModules) { INT i; LPSTR p; - for (i = 0; i < pModules->getCount(); i++) - { + for (i = 0; i < pModules->getCount(); i++) { p = (*pModules)[i]; - - /*Filter/ - if (mir_stricmp(p, "Protocol") && !DB::Module::IsMeta(p))*/ - { - ExportModule(p); - } + ExportModule(p); } } - else - { + else { ExportModule(USERINFO); ExportModule(MOD_MBIRTHDAY); } @@ -225,9 +216,7 @@ INT CExImContactXML::ExportContact(DB::CEnumList* pModules) // export contact's events if (_pXmlFile->_wExport & EXPORT_HISTORY) - { ExportEvents(); - } return ERROR_OK; } @@ -530,9 +519,10 @@ BOOLEAN CExImContactXML::ExportEvents() xmlEvent->LinkEndChild(xmlText); // find module - for (xmlModule = _xmlNode->FirstChild(); xmlModule != NULL; xmlModule = xmlModule->NextSibling()) { - if (!mir_stricmp(((TiXmlElement*)xmlModule)->Attribute("key"), dbei.szModule)) break; - } + for (xmlModule = _xmlNode->FirstChild(); xmlModule != NULL; xmlModule = xmlModule->NextSibling()) + if (!mir_stricmp(((TiXmlElement*)xmlModule)->Attribute("key"), dbei.szModule)) + break; + // create new module if (!xmlModule) { xmlModule = _xmlNode->InsertEndChild(TiXmlElement(XKEY_MOD)); @@ -583,8 +573,10 @@ VOID CExImContactXML::CountKeys(DWORD &numSettings, DWORD &numEvents) for (xkey = xmod->FirstChild(); xkey != NULL; xkey = xkey->NextSibling()) { - if (!mir_stricmp(xkey->Value(), XKEY_SET)) numSettings++; - else numEvents++; + if (!mir_stricmp(xkey->Value(), XKEY_SET)) + numSettings++; + else + numEvents++; } } } -- cgit v1.2.3