Create the watchdog client in the application init method
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Thu, 14 Jun 2012 09:23:35 +0000 (10:23 +0100)
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Thu, 14 Jun 2012 17:18:55 +0000 (18:18 +0100)
This way it is always created and systemd's watchdog timestamp is
updated as early as possible and not later in the app's startup method.

boot-manager/boot-manager-application.c

index e167c91..aaab227 100644 (file)
@@ -96,6 +96,8 @@ boot_manager_application_class_init (BootManagerApplicationClass *klass)
 static void
 boot_manager_application_init (BootManagerApplication *application)
 {
+  /* update systemd's watchdog timestamp every 120 seconds */
+  application->watchdog_client = watchdog_client_new (120);
 }
 
 
@@ -163,9 +165,6 @@ static void
 boot_manager_application_startup (GApplication *app)
 {
   BootManagerApplication *application = BOOT_MANAGER_APPLICATION (app);
-
-  /* update systemd's watchdog timestamp every 120 seconds */
-  application->watchdog_client = watchdog_client_new (120);
 }