summaryrefslogtreecommitdiff
blob: e231369e7805beb51c4369463bbe699f78e77f8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From bf775a9a9fa2c8ba66bf5106969b076c68ecedca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
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 <stefan.bruens@rwth-aachen.de>
---
 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