[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r22605 - in gnunet/src: include testbed
From: |
gnunet |
Subject: |
[GNUnet-SVN] r22605 - in gnunet/src: include testbed |
Date: |
Wed, 11 Jul 2012 15:10:26 +0200 |
Author: grothoff
Date: 2012-07-11 15:10:26 +0200 (Wed, 11 Jul 2012)
New Revision: 22605
Modified:
gnunet/src/include/gnunet_testbed_service.h
gnunet/src/testbed/test_testbed_api.c
Log:
-breaking testbed again...
Modified: gnunet/src/include/gnunet_testbed_service.h
===================================================================
--- gnunet/src/include/gnunet_testbed_service.h 2012-07-11 12:55:11 UTC (rev
22604)
+++ gnunet/src/include/gnunet_testbed_service.h 2012-07-11 13:10:26 UTC (rev
22605)
@@ -402,13 +402,39 @@
/**
+ * Function called on errors with the controller.
+ *
+ * @param cls closure
+ * @param emsg error message if available; can be NULL, which does NOT mean
+ * that there was no error
+ */
+typedef void (*GNUNET_TESTBED_ControllerErrorCallback)(void *cls,
+ const char *emsg);
+
+
+/**
* Starts a controller process at the host
*
+ * @param system used for reserving ports if host is NULL and to determine
+ * which 'host' to set as TRUSTED ('controller') when starting
testbed remotely
* @param host the host where the controller has to be started; NULL for
localhost
- * @return the controller process handle
+ * @param cfg template configuration to use for the remote controller; will
+ * be modified to contain the actual host/port/unixpath used for
+ * the testbed service
+ * @param cec function called if the contoller dies unexpectedly; will not be
+ * invoked after GNUNET_TESTBED_controller_stop, if 'cec' was
called,
+ * GNUNET_TESTBED_controller_stop must no longer be called; will
+ * never be called in the same task as
'GNUNET_TESTBED_controller_start'
+ * (synchronous errors will be signalled by returning NULL)
+ * @param cec_cls closure for 'cec'
+ * @return the controller process handle, NULL on errors
*/
struct GNUNET_TESTBED_ControllerProc *
-GNUNET_TESTBED_controller_start (struct GNUNET_TESTBED_Host *host);
+GNUNET_TESTBED_controller_start (struct GNUNET_TESTING_System *system,
+ struct GNUNET_TESTBED_Host *host,
+ struct GNUNET_CONFIGURATION_Handle *cfg,
+ GNUNET_TESTBED_ControllerErrorCallback cec,
+ void *cec_cls);
/**
Modified: gnunet/src/testbed/test_testbed_api.c
===================================================================
--- gnunet/src/testbed/test_testbed_api.c 2012-07-11 12:55:11 UTC (rev
22604)
+++ gnunet/src/testbed/test_testbed_api.c 2012-07-11 13:10:26 UTC (rev
22605)
@@ -182,11 +182,13 @@
const struct GNUNET_CONFIGURATION_Handle *config)
{
uint64_t event_mask;
+ struct GNUNET_CONFIGURATION_Handle *cdup;
cfg = config;
host = GNUNET_TESTBED_host_create (NULL, NULL, 0);
GNUNET_assert (NULL != host);
- cp = GNUNET_TESTBED_controller_start (host);
+ cdup = GNUNET_CONFIGURATION_dup (config);
+ cp = GNUNET_TESTBED_controller_start (system, host, cdup, NULL, NULL);
event_mask = 0;
event_mask |= (1L << GNUNET_TESTBED_ET_PEER_START);
event_mask |= (1L << GNUNET_TESTBED_ET_PEER_STOP);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r22605 - in gnunet/src: include testbed,
gnunet <=