* this stops our GMainLoop safely before letting main() return */
void localed_mem_clean() {
- g_ptr_array_foreach(localed_freeable, (GFunc) g_free, NULL);
- g_ptr_array_free(localed_freeable, TRUE);
+ g_printf("exiting...\n");
+
+ if(dbus_interface_exported)
+ g_dbus_interface_skeleton_unexport(G_DBUS_INTERFACE_SKELETON(localed_interf));
+
+ if(g_main_loop_is_running(localed_loop))
+ g_main_loop_quit(localed_loop);
+
}
int main() {
* this stops our GMainLoop sfaely before letting main() return */
void logind_mem_clean() {
- g_ptr_array_foreach(logind_freeable, (GFunc) g_free, NULL);
- g_ptr_array_free(logind_freeable, TRUE);
+ g_printf("exiting...\n");
+
+ if(dbus_interface_exported)
+ g_dbus_interface_skeleton_unexport(G_DBUS_INTERFACE_SKELETON(logind_interf));
+
+ if(g_main_loop_is_running(logind_loop))
+ g_main_loop_quit(logind_loop);
+
}
int main() {
* this stops our GMainLoop safely before letting main() return */
void timedated_mem_clean() {
- g_ptr_array_foreach(timedated_freeable, (GFunc) g_free, NULL);
- g_ptr_array_free(timedated_freeable, TRUE);
+ g_printf("exiting...\n");
+
+ if(dbus_interface_exported)
+ g_dbus_interface_skeleton_unexport(G_DBUS_INTERFACE_SKELETON(timedated_interf));
+
+ if(g_main_loop_is_running(timedated_loop))
+ g_main_loop_quit(timedated_loop);
+
}
int main() {