aboutsummaryrefslogtreecommitdiff
path: root/src/settings-daemon.vala
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-06-07 16:12:20 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-06-07 16:12:20 +0200
commit010986474f7fca8fd385f3722a5260f89333a7de (patch)
tree0a9903622cefec18d0c626bb77419169cdb738d2 /src/settings-daemon.vala
parentc1fcb12c1b6fb2cded315796a95856ee01573811 (diff)
downloadarctica-greeter-010986474f7fca8fd385f3722a5260f89333a7de.tar.gz
arctica-greeter-010986474f7fca8fd385f3722a5260f89333a7de.tar.bz2
arctica-greeter-010986474f7fca8fd385f3722a5260f89333a7de.zip
src/settings-daemon.vala: Avoid race condition that could launch the settings daemon twice.
Diffstat (limited to 'src/settings-daemon.vala')
-rw-r--r--src/settings-daemon.vala4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/settings-daemon.vala b/src/settings-daemon.vala
index 01ed225..f4b096e 100644
--- a/src/settings-daemon.vala
+++ b/src/settings-daemon.vala
@@ -22,7 +22,7 @@ public class SettingsDaemon : Object
private int logind_inhibit_fd = -1;
private ScreenSaverInterface screen_saver;
private SessionManagerInterface session_manager;
- private int n_names = 0;
+ private int n_names = 2;
public void start ()
{
@@ -53,7 +53,6 @@ public class SettingsDaemon : Object
/* Pretend to be MATE/GNOME session */
session_manager = new SessionManagerInterface ();
- n_names++;
GLib.Bus.own_name (BusType.SESSION, "org.gnome.SessionManager", BusNameOwnerFlags.NONE,
(c) =>
{
@@ -80,7 +79,6 @@ public class SettingsDaemon : Object
* daemon once it is registered on the bus so mate-screensaver is not
* started when it accesses this interface */
screen_saver = new ScreenSaverInterface ();
- n_names++;
GLib.Bus.own_name (BusType.SESSION, "org.gnome.ScreenSaver", BusNameOwnerFlags.NONE,
(c) =>
{