diff options
author | kremlin <ian@kremlin.cc> | 2014-07-29 15:40:03 +0800 |
---|---|---|
committer | kremlin <ian@kremlin.cc> | 2014-07-29 15:40:03 +0800 |
commit | f50e1f3bb9837435224a6ce3a7ecd078f8ba86a2 (patch) | |
tree | cab65d4ea39364459424a8922774b04818343c3f /src/interfaces | |
parent | eb20fe6d701a9921bccf54797f4b8b0054fdee1d (diff) | |
download | systembsd-f50e1f3bb9837435224a6ce3a7ecd078f8ba86a2.tar systembsd-f50e1f3bb9837435224a6ce3a7ecd078f8ba86a2.tar.gz systembsd-f50e1f3bb9837435224a6ce3a7ecd078f8ba86a2.tar.bz2 systembsd-f50e1f3bb9837435224a6ce3a7ecd078f8ba86a2.tar.lz systembsd-f50e1f3bb9837435224a6ce3a7ecd078f8ba86a2.tar.xz systembsd-f50e1f3bb9837435224a6ce3a7ecd078f8ba86a2.tar.zst systembsd-f50e1f3bb9837435224a6ce3a7ecd078f8ba86a2.zip |
(3) add needed GLib headers, move loop and bus descr out of main into global
minor variable placement changes. added gboolean dbus_interface_exported,
which due to the guarantees of the name_lost, bus_acquired, and name_acquired
is a reliable source of whether not it is reasonable to try and unexport it
Diffstat (limited to 'src/interfaces')
-rw-r--r-- | src/interfaces/localed/localed.c | 9 | ||||
-rw-r--r-- | src/interfaces/logind/logind.c | 9 | ||||
-rw-r--r-- | src/interfaces/timedated/timedated.c | 9 |
3 files changed, 18 insertions, 9 deletions
diff --git a/src/interfaces/localed/localed.c b/src/interfaces/localed/localed.c index a40e458..c11ae36 100644 --- a/src/interfaces/localed/localed.c +++ b/src/interfaces/localed/localed.c @@ -16,6 +16,7 @@ #include <unistd.h> #include <limits.h> +#include <signal.h> #include <sys/param.h> #include <string.h> @@ -29,6 +30,11 @@ GPtrArray *localed_freeable; Locale1 *localed_interf; +GMainLoop *localed_loop; + +guint bus_descriptor; +gboolean dbus_interface_exported; /* reliable because of gdbus operational guarantees */ + /* --- begin method/property/dbus signal code --- */ /*static gboolean @@ -114,9 +120,6 @@ void localed_mem_clean() { int main() { - guint bus_descriptor; - GMainLoop *localed_loop; - localed_loop = g_main_loop_new(NULL, TRUE); localed_freeable = g_ptr_array_new(); diff --git a/src/interfaces/logind/logind.c b/src/interfaces/logind/logind.c index bb740a7..3b9cab6 100644 --- a/src/interfaces/logind/logind.c +++ b/src/interfaces/logind/logind.c @@ -16,6 +16,7 @@ #include <unistd.h> #include <limits.h> +#include <signal.h> #include <sys/param.h> #include <string.h> @@ -29,6 +30,11 @@ GPtrArray *logind_freeable; Login1Manager *logind_interf; +GMainLoop *logind_loop; + +guint bus_descriptor; +gboolean dbus_interface_exported; /* reliable because of gdbus operational guarantees */ + /* --- begin method/property/dbus signal code --- */ /*static gboolean @@ -114,9 +120,6 @@ void logind_mem_clean() { int main() { - guint bus_descriptor; - GMainLoop *logind_loop; - logind_loop = g_main_loop_new(NULL, TRUE); logind_freeable = g_ptr_array_new(); diff --git a/src/interfaces/timedated/timedated.c b/src/interfaces/timedated/timedated.c index 5d465dd..8f30d01 100644 --- a/src/interfaces/timedated/timedated.c +++ b/src/interfaces/timedated/timedated.c @@ -16,6 +16,7 @@ #include <unistd.h> #include <limits.h> +#include <signal.h> #include <sys/param.h> #include <string.h> @@ -29,6 +30,11 @@ GPtrArray *timedated_freeable; Timedate1 *timedated_interf; +GMainLoop *timedated_loop; + +guint bus_descriptor; +gboolean dbus_interface_exported; /* reliable because of gdbus operational guarantees */ + /* --- begin method/property/dbus signal code --- */ /*static gboolean @@ -114,9 +120,6 @@ void timedated_mem_clean() { int main() { - guint bus_descriptor; - GMainLoop *timedated_loop; - timedated_loop = g_main_loop_new(NULL, TRUE); timedated_freeable = g_ptr_array_new(); |