gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r37378 - in gnunet/src: include testbed


From: gnunet
Subject: [GNUnet-SVN] r37378 - in gnunet/src: include testbed
Date: Sat, 25 Jun 2016 22:14:35 +0200

Author: grothoff
Date: 2016-06-25 22:14:33 +0200 (Sat, 25 Jun 2016)
New Revision: 37378

Modified:
   gnunet/src/include/gnunet_testbed_service.h
   gnunet/src/testbed/testbed_api_barriers.c
Log:
-doxygen

Modified: gnunet/src/include/gnunet_testbed_service.h
===================================================================
--- gnunet/src/include/gnunet_testbed_service.h 2016-06-25 20:01:13 UTC (rev 
37377)
+++ gnunet/src/include/gnunet_testbed_service.h 2016-06-25 20:14:33 UTC (rev 
37378)
@@ -183,11 +183,10 @@
  *          given to GNUNET_TESTBED_is_host_habitable() is NULL
  * @param status GNUNET_YES if it is habitable; GNUNET_NO if not
  */
-typedef void (*GNUNET_TESTBED_HostHabitableCallback) (void *cls,
-                                                      const struct
-                                                      GNUNET_TESTBED_Host
-                                                      *host,
-                                                      int status);
+typedef void
+(*GNUNET_TESTBED_HostHabitableCallback) (void *cls,
+                                         const struct GNUNET_TESTBED_Host 
*host,
+                                         int status);
 
 
 /**
@@ -419,8 +418,9 @@
  * @param cls closure
  * @param event information about the event
  */
-typedef void (*GNUNET_TESTBED_ControllerCallback)(void *cls,
-                                                  const struct 
GNUNET_TESTBED_EventInformation *event);
+typedef void
+(*GNUNET_TESTBED_ControllerCallback)(void *cls,
+                                     const struct 
GNUNET_TESTBED_EventInformation *event);
 
 
 /**
@@ -434,13 +434,14 @@
  *
  * @param cls the closure from GNUNET_TESTBED_controller_start()
  * @param cfg the configuration with which the controller has been started;
- *          NULL if status is not GNUNET_OK
- * @param status GNUNET_OK if the startup is successfull; GNUNET_SYSERR if not,
+ *          NULL if status is not #GNUNET_OK
+ * @param status #GNUNET_OK if the startup is successfull; #GNUNET_SYSERR if 
not,
  *          GNUNET_TESTBED_controller_stop() shouldn't be called in this case
  */
-typedef void (*GNUNET_TESTBED_ControllerStatusCallback) (void *cls,
-                                                        const struct 
GNUNET_CONFIGURATION_Handle *cfg,
-                                                        int status);
+typedef void
+(*GNUNET_TESTBED_ControllerStatusCallback) (void *cls,
+                                            const struct 
GNUNET_CONFIGURATION_Handle *cfg,
+                                            int status);
 
 
 /**
@@ -531,8 +532,9 @@
  * @param cls the closure
  * @param emsg the error message; NULL if host registration is successful
  */
-typedef void (* GNUNET_TESTBED_HostRegistrationCompletion) (void *cls,
-                                                            const char *emsg);
+typedef void
+(* GNUNET_TESTBED_HostRegistrationCompletion) (void *cls,
+                                               const char *emsg);
 
 
 /**
@@ -579,11 +581,10 @@
  * @param emsg error message in case the operation has failed; will be NULL if
  *          operation has executed successfully.
  */
-typedef void (*GNUNET_TESTBED_OperationCompletionCallback) (void *cls,
-                                                            struct
-                                                            
GNUNET_TESTBED_Operation
-                                                            *op,
-                                                            const char *emsg);
+typedef void
+(*GNUNET_TESTBED_OperationCompletionCallback) (void *cls,
+                                               struct GNUNET_TESTBED_Operation 
*op,
+                                               const char *emsg);
 
 
 /**
@@ -652,9 +653,10 @@
  *          creation
  * @param emsg NULL if peer is not NULL; else MAY contain the error description
  */
-typedef void (*GNUNET_TESTBED_PeerCreateCallback) (void *cls,
-                                                   struct GNUNET_TESTBED_Peer 
*peer,
-                                                   const char *emsg);
+typedef void
+(*GNUNET_TESTBED_PeerCreateCallback) (void *cls,
+                                      struct GNUNET_TESTBED_Peer *peer,
+                                      const char *emsg);
 
 
 /**
@@ -701,8 +703,9 @@
  * @param cls the closure from GNUNET_TESTBED_peer_start/stop()
  * @param emsg NULL on success; otherwise an error description
  */
-typedef void (*GNUNET_TESTBED_PeerChurnCallback) (void *cls,
-                                                  const char *emsg);
+typedef void
+(*GNUNET_TESTBED_PeerChurnCallback) (void *cls,
+                                     const char *emsg);
 
 
 /**
@@ -780,13 +783,11 @@
  * @param emsg error message if the operation has failed; will be NULL if the
  *          operation is successfull
  */
-typedef void (*GNUNET_TESTBED_PeerInfoCallback) (void *cb_cls,
-                                                 struct 
GNUNET_TESTBED_Operation
-                                                 *op,
-                                                 const struct
-                                                 GNUNET_TESTBED_PeerInformation
-                                                 *pinfo,
-                                                 const char *emsg);
+typedef void
+(*GNUNET_TESTBED_PeerInfoCallback) (void *cb_cls,
+                                    struct GNUNET_TESTBED_Operation *op,
+                                    const struct 
GNUNET_TESTBED_PeerInformation *pinfo,
+                                    const char *emsg);
 
 
 /**
@@ -1208,8 +1209,9 @@
  *          from GNUNET_TESTBED_service_connect()
  * @return service handle to return in 'op_result', NULL on error
  */
-typedef void * (*GNUNET_TESTBED_ConnectAdapter)(void *cls,
-                                                const struct 
GNUNET_CONFIGURATION_Handle *cfg);
+typedef void *
+(*GNUNET_TESTBED_ConnectAdapter)(void *cls,
+                                 const struct GNUNET_CONFIGURATION_Handle 
*cfg);
 
 
 /**
@@ -1219,8 +1221,9 @@
  * @param cls closure
  * @param op_result service handle returned from the connect adapter
  */
-typedef void (*GNUNET_TESTBED_DisconnectAdapter)(void *cls,
-                                                 void *op_result);
+typedef void
+(*GNUNET_TESTBED_DisconnectAdapter)(void *cls,
+                                    void *op_result);
 
 
 /**
@@ -1232,14 +1235,11 @@
  * @param emsg error message in case the operation has failed; will be NULL if
  *          operation has executed successfully.
  */
-typedef void (*GNUNET_TESTBED_ServiceConnectCompletionCallback) (void *cls,
-                                                                 struct
-                                                                 
GNUNET_TESTBED_Operation
-                                                                 *op,
-                                                                 void
-                                                                 *ca_result,
-                                                                 const char
-                                                                 *emsg );
+typedef void
+(*GNUNET_TESTBED_ServiceConnectCompletionCallback) (void *cls,
+                                                    struct 
GNUNET_TESTBED_Operation *op,
+                                                    void *ca_result,
+                                                    const char *emsg );
 
 
 /**
@@ -1308,15 +1308,16 @@
  * @param subsystem name of subsystem that created the statistic
  * @param name the name of the datum
  * @param value the current value
- * @param is_persistent GNUNET_YES if the value is persistent, GNUNET_NO if not
- * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration
+ * @param is_persistent #GNUNET_YES if the value is persistent, #GNUNET_NO if 
not
+ * @return #GNUNET_OK to continue, #GNUNET_SYSERR to abort iteration
  */
-typedef int (*GNUNET_TESTBED_StatisticsIterator) (void *cls,
-                                                  const struct 
GNUNET_TESTBED_Peer *peer,
-                                                  const char *subsystem,
-                                                  const char *name,
-                                                  uint64_t value,
-                                                  int is_persistent);
+typedef int
+(*GNUNET_TESTBED_StatisticsIterator) (void *cls,
+                                      const struct GNUNET_TESTBED_Peer *peer,
+                                      const char *subsystem,
+                                      const char *name,
+                                      uint64_t value,
+                                      int is_persistent);
 
 
 /**
@@ -1524,17 +1525,17 @@
  * @param cls the closure given to GNUNET_TESTBED_barrier_init()
  * @param name the name of the barrier
  * @param barrier the barrier handle
- * @param status status of the barrier; GNUNET_OK if the barrier is crossed;
- *   GNUNET_SYSERR upon error
- * @param emsg if the status were to be GNUNET_SYSERR, this parameter has the
+ * @param status status of the barrier; #GNUNET_OK if the barrier is crossed;
+ *   #GNUNET_SYSERR upon error
+ * @param emsg if the status were to be #GNUNET_SYSERR, this parameter has the
  *   error messsage
  */
-typedef void (*GNUNET_TESTBED_barrier_status_cb) (void *cls,
-                                                  const char *name,
-                                                  struct GNUNET_TESTBED_Barrier
-                                                  *barrier,
-                                                  enum 
GNUNET_TESTBED_BarrierStatus status,
-                                                  const char *emsg);
+typedef void
+(*GNUNET_TESTBED_barrier_status_cb) (void *cls,
+                                     const char *name,
+                                     struct GNUNET_TESTBED_Barrier *barrier,
+                                     enum GNUNET_TESTBED_BarrierStatus status,
+                                     const char *emsg);
 
 
 /**
@@ -1555,7 +1556,8 @@
 GNUNET_TESTBED_barrier_init (struct GNUNET_TESTBED_Controller *controller,
                              const char *name,
                              unsigned int quorum,
-                             GNUNET_TESTBED_barrier_status_cb cb, void *cls);
+                             GNUNET_TESTBED_barrier_status_cb cb,
+                             void *cls);
 
 
 /**
@@ -1580,12 +1582,13 @@
  *
  * @param cls closure pointer given to GNUNET_TESTBED_barrier_wait()
  * @param name the barrier name
- * @param status GNUNET_SYSERR in case of error while waiting for the barrier;
- *   GNUNET_OK if the barrier is crossed
+ * @param status #GNUNET_SYSERR in case of error while waiting for the barrier;
+ *   #GNUNET_OK if the barrier is crossed
  */
-typedef void (*GNUNET_TESTBED_barrier_wait_cb) (void *cls,
-                                                const char *name,
-                                                int status);
+typedef void
+(*GNUNET_TESTBED_barrier_wait_cb) (void *cls,
+                                   const char *name,
+                                   int status);
 
 
 /**

Modified: gnunet/src/testbed/testbed_api_barriers.c
===================================================================
--- gnunet/src/testbed/testbed_api_barriers.c   2016-06-25 20:01:13 UTC (rev 
37377)
+++ gnunet/src/testbed/testbed_api_barriers.c   2016-06-25 20:14:33 UTC (rev 
37378)
@@ -206,7 +206,8 @@
     goto cleanup;
   }
   GNUNET_assert (NULL != barrier->cb);
-  if ((GNUNET_YES == barrier->echo) && (GNUNET_TESTBED_BARRIERSTATUS_CROSSED 
== status))
+  if ((GNUNET_YES == barrier->echo) &&
+      (GNUNET_TESTBED_BARRIERSTATUS_CROSSED == status))
     GNUNET_TESTBED_queue_message_ (c, GNUNET_copy_message (&msg->header));
   barrier->cb (barrier->cls, name, barrier, status, emsg);
   if (GNUNET_TESTBED_BARRIERSTATUS_INITIALISED == status)
@@ -270,7 +271,8 @@
   barrier->echo = echo;
   (void) memcpy (&barrier->key, &key, sizeof (struct GNUNET_HashCode));
   GNUNET_assert (GNUNET_OK ==
-                 GNUNET_CONTAINER_multihashmap_put (barrier_map, &barrier->key,
+                 GNUNET_CONTAINER_multihashmap_put (barrier_map,
+                                                    &barrier->key,
                                                     barrier,
                                                     
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST));
   msize = name_len + sizeof (struct GNUNET_TESTBED_BarrierInit);
@@ -304,7 +306,8 @@
                              unsigned int quorum,
                              GNUNET_TESTBED_barrier_status_cb cb, void *cls)
 {
-  return GNUNET_TESTBED_barrier_init_ (controller, name, quorum, cb, cls, 
GNUNET_YES);
+  return GNUNET_TESTBED_barrier_init_ (controller,
+                                       name, quorum, cb, cls, GNUNET_YES);
 }
 
 
@@ -399,7 +402,8 @@
  * @param message received message; NULL on timeout or fatal error
  */
 static void
-receive_handler (void *cls, const struct GNUNET_MessageHeader *message)
+receive_handler (void *cls,
+                 const struct GNUNET_MessageHeader *message)
 {
   struct GNUNET_TESTBED_BarrierWaitHandle *h = cls;
   const struct GNUNET_TESTBED_BarrierStatusMsg *msg;
@@ -524,7 +528,8 @@
   h->cls = cls;
   if (NULL == h->conn)
   {
-    LOG (GNUNET_ERROR_TYPE_ERROR, "Unable to connect to local testbed-barrier 
service\n");
+    LOG (GNUNET_ERROR_TYPE_ERROR,
+         "Unable to connect to local testbed-barrier service\n");
     destroy_handle (h);
     return NULL;
   }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]