summaryrefslogtreecommitdiff
path: root/plugins/Import
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-09-30 19:07:24 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-09-30 19:07:24 +0000
commit1c419d4db5f48e3ccae1b09c53c99d2863b03c9e (patch)
tree65155dc1cae3ffff94a454f79e7a28e0f5ab1e10 /plugins/Import
parent559624af12bf19b4bc925cf3f95c6fbd809cc4fb (diff)
empty accounts to be reused by import
git-svn-id: http://svn.miranda-ng.org/main/trunk@10655 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Import')
-rw-r--r--plugins/Import/src/import.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp
index f038a2fe86..0d8c448b20 100644
--- a/plugins/Import/src/import.cpp
+++ b/plugins/Import/src/import.cpp
@@ -202,6 +202,7 @@ static PROTOACCOUNT* FindMyAccount(const char *szProto, const char *szBaseProto)
PROTOACCOUNT **destAccs;
CallService(MS_PROTO_ENUMACCOUNTS, (WPARAM)&destProtoCount, (LPARAM)&destAccs);
+ PROTOACCOUNT *pProto = NULL;
for (int i = 0; i < destProtoCount; i++) {
PROTOACCOUNT *pa = destAccs[i];
if (lstrcmpA(pa->szProtoName, szBaseProto))
@@ -212,12 +213,16 @@ static PROTOACCOUNT* FindMyAccount(const char *szProto, const char *szBaseProto)
return pa;
char *pszUniqueSetting = (char*)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
- if (!pszUniqueSetting || INT_PTR(pszUniqueSetting) == CALLSERVICE_NOTFOUND)
+ if (!pszUniqueSetting || INT_PTR(pszUniqueSetting) == CALLSERVICE_NOTFOUND) {
+ pProto = pa;
continue;
+ }
DBVARIANT dbSrc, dbDst;
- if (dstDb->GetContactSetting(NULL, pa->szModuleName, pszUniqueSetting, &dbDst))
+ if (dstDb->GetContactSetting(NULL, pa->szModuleName, pszUniqueSetting, &dbDst)) {
+ pProto = pa;
continue;
+ }
bool bEqual = false;
if (!myGet(NULL, szProto, pszUniqueSetting, &dbSrc)) {
@@ -229,7 +234,7 @@ static PROTOACCOUNT* FindMyAccount(const char *szProto, const char *szBaseProto)
if (bEqual)
return pa;
}
- return NULL;
+ return pProto;
}
void ImportAccounts()