From bf775a9a9fa2c8ba66bf5106969b076c68ecedca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Sun, 31 May 2015 06:40:38 +0200 Subject: [PATCH 1/5] Check for unique applicaton instance as early as possible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Exit before KWalletD and the MigrationAgent has been initialized. The return value is changed, but concurrent instatiation of kwalletd is not a fault. Signed-off-by: Stefan BrĂ¼ns --- src/runtime/kwalletd/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/runtime/kwalletd/main.cpp b/src/runtime/kwalletd/main.cpp index ff96208..c98c1b3 100644 --- a/src/runtime/kwalletd/main.cpp +++ b/src/runtime/kwalletd/main.cpp @@ -189,9 +189,10 @@ int main(int argc, char **argv) aboutdata.addAuthor(i18n("George Staikos"), i18n("Former maintainer"), QStringLiteral("staikos@kde.org")); aboutdata.addAuthor(i18n("Thiago Maceira"), i18n("D-Bus Interface"), QStringLiteral("thiago@kde.org")); + KDBusService dbusUniqueInstance(KDBusService::Unique); + KWalletD walletd; MigrationAgent migrationAgent(&walletd, hash); - KDBusService dbusUniqueInstance(KDBusService::Unique); // NOTE: the command should be parsed only after KDBusService instantiation QCommandLineParser cmdParser; -- 2.12.0