diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2024-06-18 12:55:59 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2024-06-18 12:57:24 +0200 |
commit | 5ced7b5858c935dc6f00a238298bb35b945ad2d7 (patch) | |
tree | 5b8cbbe130c838ac8311475e903ac80bc445b3c3 /src/arctica-greeter.vala | |
parent | 0bf37ddcf4ca9e79a426e02ff65ad3774f63e838 (diff) | |
download | arctica-greeter-5ced7b5858c935dc6f00a238298bb35b945ad2d7.tar.gz arctica-greeter-5ced7b5858c935dc6f00a238298bb35b945ad2d7.tar.bz2 arctica-greeter-5ced7b5858c935dc6f00a238298bb35b945ad2d7.zip |
src/: Don't launch Geoclue agent when in test mode.
Diffstat (limited to 'src/arctica-greeter.vala')
-rw-r--r-- | src/arctica-greeter.vala | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala index 7a7a315..92165b3 100644 --- a/src/arctica-greeter.vala +++ b/src/arctica-greeter.vala @@ -1358,6 +1358,7 @@ public class ArcticaGreeter : Object Pid atspi_pid = 0; Pid nmapplet_pid = 0; + Pid geoclueagent_pid = 0; if (!do_test_mode) { @@ -1385,34 +1386,33 @@ public class ArcticaGreeter : Object { warning ("Error starting the at-spi registry: %s", e.message); } - } - Pid geoclueagent_pid = 0; - if (AGSettings.get_boolean (AGSettings.KEY_GEOCLUE_AGENT) && (!do_test_mode)) - { - - try + if (AGSettings.get_boolean (AGSettings.KEY_GEOCLUE_AGENT) && (!do_test_mode)) { - string[] argv = null; - if (FileUtils.test ("/usr/lib/geoclue-2.0/demos/agent", FileTest.EXISTS)) { - Shell.parse_argv ("/usr/lib/geoclue-2.0/demos/agent", out argv); + try + { + string[] argv = null; + + if (FileUtils.test ("/usr/lib/geoclue-2.0/demos/agent", FileTest.EXISTS)) { + Shell.parse_argv ("/usr/lib/geoclue-2.0/demos/agent", out argv); + } + else if (FileUtils.test ("/usr/libexec/geoclue-2.0/demos/agent", FileTest.EXISTS)) { + Shell.parse_argv ("/usr/libexec/geoclue-2.0/demos/agent", out argv); + } + if (argv != null) + Process.spawn_async (null, + argv, + null, + SpawnFlags.SEARCH_PATH, + null, + out geoclueagent_pid); + debug ("Launched GeoClue-2.0 agent. PID: %d", geoclueagent_pid); } - else if (FileUtils.test ("/usr/libexec/geoclue-2.0/demos/agent", FileTest.EXISTS)) { - Shell.parse_argv ("/usr/libexec/geoclue-2.0/demos/agent", out argv); + catch (Error e) + { + warning ("Error starting the GeoClue-2.0 agent: %s", e.message); } - if (argv != null) - Process.spawn_async (null, - argv, - null, - SpawnFlags.SEARCH_PATH, - null, - out geoclueagent_pid); - debug ("Launched GeoClue-2.0 agent. PID: %d", geoclueagent_pid); - } - catch (Error e) - { - warning ("Error starting the GeoClue-2.0 agent: %s", e.message); } } |