[gconf/port-to-dbus: 1/23] gconfd: Add internal API (gconfd_main_quit) to allow clean daemon shutdown



commit d67569a566412f4b87aab75bd43597125fae4018
Author: Rob Bradford <rob linux intel com>
Date:   Wed Jun 15 17:39:36 2011 +0100

    gconfd: Add internal API (gconfd_main_quit) to allow clean daemon shutdown
    
    This API call is needed by the DBUS handling code to shutdown the core of the
    daemon when the dbus clients are disconnected.

 gconf/gconfd.c |   15 +++++++--------
 gconf/gconfd.h |    1 +
 2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gconf/gconfd.c b/gconf/gconfd.c
index b89e7a1..ecdc167 100644
--- a/gconf/gconfd.c
+++ b/gconf/gconfd.c
@@ -121,7 +121,6 @@ safe_g_hash_table_insert(GHashTable* ht, gpointer key, gpointer value)
  */
 
 static void     gconf_main            (void);
-static void     gconf_main_quit       (void);
 static gboolean gconf_main_is_running (void);
 
 static void logfile_save (void);
@@ -335,7 +334,7 @@ gconfd_shutdown(PortableServer_Servant servant, CORBA_Environment *ev)
   
   gconf_log(GCL_DEBUG, _("Shutdown request received"));
 
-  gconf_main_quit();
+  gconfd_main_quit();
 }
 
 /*
@@ -472,7 +471,7 @@ signal_handler (int signo)
     --in_fatal;
     
     if (gconf_main_is_running ())
-      gconf_main_quit ();
+      gconfd_main_quit ();
     
     break;
 
@@ -483,7 +482,7 @@ signal_handler (int signo)
     --in_fatal;
     
     if (gconf_main_is_running ())
-      gconf_main_quit ();
+      gconfd_main_quit ();
     break;
 
 #ifdef SIGHUP
@@ -550,7 +549,7 @@ bus_message_handler (DBusConnection *connection,
                               DBUS_INTERFACE_LOCAL,
                               "Disconnected"))
     {
-      gconf_main_quit ();
+      gconfd_main_quit ();
       return DBUS_HANDLER_RESULT_HANDLED;
     }
   else if (dbus_message_is_method_call (message,
@@ -1006,7 +1005,7 @@ periodic_cleanup_timeout(gpointer data)
   if (no_databases_in_use () && client_count () == 0)
     {
       gconf_log (GCL_INFO, _("GConf server is not in use, shutting down."));
-      gconf_main_quit ();
+      gconfd_main_quit ();
       return FALSE;
     }
   
@@ -1067,8 +1066,8 @@ gconf_main(void)
   g_main_loop_unref (loop);
 }
 
-static void 
-gconf_main_quit(void)
+void
+gconfd_main_quit(void)
 {
   g_return_if_fail(main_loops != NULL);
 
diff --git a/gconf/gconfd.h b/gconf/gconfd.h
index 1071259..6d857b4 100644
--- a/gconf/gconfd.h
+++ b/gconf/gconfd.h
@@ -50,6 +50,7 @@ void
 gconfd_clear_cache_for_sources (GConfSources *sources);
 
 void gconfd_need_log_cleanup (void);
+void gconfd_main_quit        (void);
 
 G_END_DECLS
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]