From ac4a9675eaceb841cea910f4c73563f720787c95 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 16 Oct 2014 19:40:47 +0000 Subject: correct dest acccount mapping git-svn-id: http://svn.miranda-ng.org/main/trunk@10804 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Import/src/import.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index 779e9c8423..31c5b63d6f 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -196,6 +196,15 @@ void CopySettings(MCONTACT srcID, const char *szSrcModule, MCONTACT dstID, const ///////////////////////////////////////////////////////////////////////////////////////// +static bool FindDestAccount(const char *szProto) +{ + for (int i = 0; i < arAccountMap.getCount(); i++) + if (!strcmp(arAccountMap[i].szDstAcc, szProto)) + return true; + + return false; +} + static PROTOACCOUNT* FindMyAccount(const char *szProto, const char *szBaseProto) { int destProtoCount; @@ -206,7 +215,7 @@ static PROTOACCOUNT* FindMyAccount(const char *szProto, const char *szBaseProto) for (int i = 0; i < destProtoCount; i++) { PROTOACCOUNT *pa = destAccs[i]; // already used? skip - if (arAccountMap.find((AccountMap*)&pa->szProtoName)) + if (FindDestAccount(pa->szModuleName)) continue; // different base protocotol type -> skip -- cgit v1.2.3