[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r29174 - gnunet-gtk/src/setup
From: |
gnunet |
Subject: |
[GNUnet-SVN] r29174 - gnunet-gtk/src/setup |
Date: |
Tue, 10 Sep 2013 21:36:31 +0200 |
Author: grothoff
Date: 2013-09-10 21:36:31 +0200 (Tue, 10 Sep 2013)
New Revision: 29174
Modified:
gnunet-gtk/src/setup/gnunet-setup.c
Log:
-also start identity service if it is not yet running
Modified: gnunet-gtk/src/setup/gnunet-setup.c
===================================================================
--- gnunet-gtk/src/setup/gnunet-setup.c 2013-09-10 19:28:07 UTC (rev 29173)
+++ gnunet-gtk/src/setup/gnunet-setup.c 2013-09-10 19:36:31 UTC (rev 29174)
@@ -65,6 +65,11 @@
static struct GNUNET_OS_Process *namestore;
/**
+ * Identity process handle.
+ */
+static struct GNUNET_OS_Process *identity;
+
+/**
* Run autoconfig-only and then exit immediately.
*/
static int do_autoconfig;
@@ -381,6 +386,12 @@
GNUNET_OS_process_destroy (namestore);
namestore = NULL;
}
+ if (NULL != identity)
+ {
+ GNUNET_break (0 == GNUNET_OS_process_kill (identity, SIGTERM));
+ GNUNET_OS_process_destroy (identity);
+ identity = NULL;
+ }
}
@@ -450,6 +461,30 @@
/**
+ * If the test failed, start the identity process.
+ *
+ * @param cls closure, NULL
+ * @param result #GNUNET_YES if the service is running
+ */
+static void
+start_identity (void *cls,
+ int result)
+{
+ char *binary;
+
+ if (GNUNET_YES == result)
+ return;
+ binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-identity");
+ identity =
+ GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ALL,
+ NULL, NULL,
+ binary,
+ "gnunet-service-identity", NULL);
+ GNUNET_free (binary);
+}
+
+
+/**
* If the test failed, start the namestore process.
*
* @param cls closure, NULL
@@ -598,6 +633,10 @@
cfg,
GNUNET_CONSTANTS_SERVICE_TIMEOUT,
&start_namestore, NULL);
+ GNUNET_CLIENT_service_test ("identity",
+ cfg,
+ GNUNET_CONSTANTS_SERVICE_TIMEOUT,
+ &start_identity, NULL);
load_options ();
GNUNET_SETUP_gns_init ();
#ifndef MINGW
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r29174 - gnunet-gtk/src/setup,
gnunet <=