From b97a2cf13002dd897e1021f4f5ae30006f87b269 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 22 Mar 2018 22:19:44 +0300 Subject: fix for import old-style accounts visibility settings --- plugins/Import/src/import.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'plugins') diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index 76ff58be8e..5faff95ca8 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -459,7 +459,7 @@ bool ImportAccounts(OBJLIST &arSkippedModules) bool bImportSysAll = (nImportOptions & IOPT_SYS_SETTINGS) != 0; for (auto &p : arAccountMap) { - if (p->pa != nullptr || p->szBaseProto == NULL || !mir_strcmp(p->szSrcAcc, META_PROTO)) + if (p->szBaseProto == NULL || !mir_strcmp(p->szSrcAcc, META_PROTO)) continue; if (!Proto_IsProtocolLoaded(p->szBaseProto)) { @@ -467,15 +467,17 @@ bool ImportAccounts(OBJLIST &arSkippedModules) continue; } - ACC_CREATE newacc; - newacc.pszBaseProto = p->szBaseProto; - newacc.pszInternal = nullptr; - newacc.ptszAccountName = p->tszSrcName; - - p->pa = ProtoCreateAccount(&newacc); if (p->pa == nullptr) { - AddMessage(LPGENW("Unable to create an account %s of protocol %S"), p->tszSrcName, p->szBaseProto); - return false; + ACC_CREATE newacc; + newacc.pszBaseProto = p->szBaseProto; + newacc.pszInternal = nullptr; + newacc.ptszAccountName = p->tszSrcName; + + p->pa = ProtoCreateAccount(&newacc); + if (p->pa == nullptr) { + AddMessage(LPGENW("Unable to create an account %s of protocol %S"), p->tszSrcName, p->szBaseProto); + continue; + } } char szSetting[100]; -- cgit v1.2.3