From: kremlin Date: Tue, 29 Jul 2014 07:40:03 +0000 (-0500) Subject: (3) add needed GLib headers, move loop and bus descr out of main into global X-Git-Url: https://uglyman.kremlin.cc/gitweb/gitweb.cgi?a=commitdiff_plain;h=f50e1f3bb9837435224a6ce3a7ecd078f8ba86a2;p=systembsd.git (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 --- 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 #include +#include #include #include @@ -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 #include +#include #include #include @@ -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 #include +#include #include #include @@ -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();