[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r13012 - in gnunet/src: include testing
From: |
gnunet |
Subject: |
[GNUnet-SVN] r13012 - in gnunet/src: include testing |
Date: |
Fri, 17 Sep 2010 17:56:15 +0200 |
Author: nevans
Date: 2010-09-17 17:56:15 +0200 (Fri, 17 Sep 2010)
New Revision: 13012
Modified:
gnunet/src/include/gnunet_testing_lib.h
gnunet/src/testing/testing.c
Log:
testing api addition
Modified: gnunet/src/include/gnunet_testing_lib.h
===================================================================
--- gnunet/src/include/gnunet_testing_lib.h 2010-09-17 15:55:34 UTC (rev
13011)
+++ gnunet/src/include/gnunet_testing_lib.h 2010-09-17 15:56:15 UTC (rev
13012)
@@ -448,6 +448,17 @@
GNUNET_TESTING_daemon_continue_startup(struct GNUNET_TESTING_Daemon *daemon);
/**
+ * Check whether the given daemon is running.
+ *
+ * @param daemon the daemon to check
+ *
+ * @return GNUNET_YES if the daemon is up, GNUNET_NO if the
+ * daemon is down, GNUNET_SYSERR on error.
+ */
+int
+GNUNET_TESTING_daemon_running (struct GNUNET_TESTING_Daemon *daemon);
+
+/**
* Restart (stop and start) a GNUnet daemon.
*
* @param d the daemon that should be restarted
Modified: gnunet/src/testing/testing.c
===================================================================
--- gnunet/src/testing/testing.c 2010-09-17 15:55:34 UTC (rev 13011)
+++ gnunet/src/testing/testing.c 2010-09-17 15:56:15 UTC (rev 13012)
@@ -696,7 +696,26 @@
daemon->phase = SP_TOPOLOGY_SETUP;
}
+/**
+ * Check whether the given daemon is running.
+ *
+ * @param daemon the daemon to check
+ *
+ * @return GNUNET_YES if the daemon is up, GNUNET_NO if the
+ * daemon is down, GNUNET_SYSERR on error.
+ */
+int
+GNUNET_TESTING_daemon_running (struct GNUNET_TESTING_Daemon *daemon)
+{
+ if (daemon == NULL)
+ return GNUNET_SYSERR;
+ if (daemon->running == GNUNET_YES)
+ return GNUNET_YES;
+ return GNUNET_NO;
+}
+
+
/**
* Start a peer that has previously been stopped using the daemon_stop
* call (and files weren't deleted and the allow restart flag)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r13012 - in gnunet/src: include testing,
gnunet <=