gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r27598 - in gnunet: doc src/consensus src/include src/set s


From: gnunet
Subject: [GNUnet-SVN] r27598 - in gnunet: doc src/consensus src/include src/set src/stream src/util
Date: Wed, 26 Jun 2013 01:37:14 +0200

Author: dold
Date: 2013-06-26 01:37:13 +0200 (Wed, 26 Jun 2013)
New Revision: 27598

Modified:
   gnunet/doc/testbed_test.c
   gnunet/src/consensus/consensus_api.c
   gnunet/src/consensus/gnunet-service-consensus.c
   gnunet/src/include/gnunet_mq_lib.h
   gnunet/src/include/gnunet_set_service.h
   gnunet/src/include/gnunet_stream_lib.h
   gnunet/src/set/gnunet-service-set.c
   gnunet/src/set/gnunet-service-set.h
   gnunet/src/set/gnunet-service-set_intersection.c
   gnunet/src/set/gnunet-service-set_union.c
   gnunet/src/set/gnunet-set-profiler.c
   gnunet/src/set/set_api.c
   gnunet/src/stream/stream_api.c
   gnunet/src/util/mq.c
Log:
doxygen


Modified: gnunet/doc/testbed_test.c
===================================================================
--- gnunet/doc/testbed_test.c   2013-06-25 20:51:44 UTC (rev 27597)
+++ gnunet/doc/testbed_test.c   2013-06-25 23:37:13 UTC (rev 27598)
@@ -111,6 +111,7 @@
  * Dual of 'dht_ca' to perform the 'disconnect'/cleanup operation
  * once we no longer need to access this subsystem.
  *
+ * @param cls closure
  * @param op_result whatever we returned from 'dht_ca'
  */
 static void 
@@ -130,6 +131,7 @@
  * just to the DHT service of peer 0.
  *
  * @param cls closure
+ * @param peers started peers for the test
  * @param num_peers size of the 'peers' array
  * @param links_succeeded number of links between peers that were created
  * @param links_failed number of links testbed was unable to establish
@@ -137,7 +139,7 @@
 static void
 test_master (void *cls, unsigned int num_peers,
              struct GNUNET_TESTBED_Peer **peers,
-             unsigned int links_succeeeded,
+             unsigned int links_succeeded,
              unsigned int links_failed)
 {
   /* Testbed is ready with peers running and connected in a pre-defined overlay

Modified: gnunet/src/consensus/consensus_api.c
===================================================================
--- gnunet/src/consensus/consensus_api.c        2013-06-25 20:51:44 UTC (rev 
27597)
+++ gnunet/src/consensus/consensus_api.c        2013-06-25 23:37:13 UTC (rev 
27598)
@@ -141,7 +141,7 @@
  * that the conclusion is over.
  * 
  * @param cls consensus handle
- * @param mh conclude done message
+ * @param msg conclude done message
  */
 static void
 handle_conclude_done (void *cls,

Modified: gnunet/src/consensus/gnunet-service-consensus.c
===================================================================
--- gnunet/src/consensus/gnunet-service-consensus.c     2013-06-25 20:51:44 UTC 
(rev 27597)
+++ gnunet/src/consensus/gnunet-service-consensus.c     2013-06-25 23:37:13 UTC 
(rev 27598)
@@ -702,6 +702,7 @@
  * Called when another peer wants to do a set operation with the
  * local peer.
  *
+ * @param cls closure
  * @param other_peer the other peer
  * @param context_msg message with application specific information from
  *        the other peer
@@ -786,6 +787,7 @@
  * Initialize the session, continue receiving messages from the owning client
  *
  * @param session the session to initialize
+ * @param join_msg the join message from the client
  */
 static void
 initialize_session (struct ConsensusSession *session,

Modified: gnunet/src/include/gnunet_mq_lib.h
===================================================================
--- gnunet/src/include/gnunet_mq_lib.h  2013-06-25 20:51:44 UTC (rev 27597)
+++ gnunet/src/include/gnunet_mq_lib.h  2013-06-25 23:37:13 UTC (rev 27598)
@@ -20,7 +20,7 @@
 
 /**
  * @author Florian Dold
- * @file set/mq.h
+ * @file include/gnunet_mq_lib.h
  * @brief general purpose message queue
  */
 #ifndef GNUNET_MQ_H
@@ -114,6 +114,9 @@
  *
  * @param mhp pointer to the message header pointer that will be changed to 
allocate at
  *        the newly allocated space for the message.
+ * @param base_size size of the data before the nested message
+ * @param type type of the message in the envelope
+ * @param nested_mh the message to append to the message after base_size
  */
 struct GNUNET_MQ_Envelope *
 GNUNET_MQ_msg_nested_mh_ (struct GNUNET_MessageHeader **mhp, uint16_t 
base_size, uint16_t type,
@@ -271,7 +274,7 @@
  * May only be called once per message.
  * 
  * @param mq message queue
- * @param mqm the message to send.
+ * @param ev the envelope with the message to send.
  */
 void
 GNUNET_MQ_send (struct GNUNET_MQ_Handle *mq, struct GNUNET_MQ_Envelope *ev);
@@ -281,7 +284,7 @@
  * Cancel sending the message. Message must have been sent with GNUNET_MQ_send 
before.
  * May not be called after the notify sent callback has been called
  *
- * @param mqm queued message to cancel
+ * @param ev queued envelope to cancel
  */
 void
 GNUNET_MQ_send_cancel (struct GNUNET_MQ_Envelope *ev);
@@ -291,7 +294,6 @@
  * Associate the assoc_data in mq with a unique request id.
  *
  * @param mq message queue, id will be unique for the queue
- * @param mqm message to associate
  * @param assoc_data to associate
  */
 uint32_t
@@ -350,11 +352,11 @@
  *
  * @param send function the implements sending messages
  * @param destroy function that implements destroying the queue
- * @param destroy function that implements canceling a message
- * @param state for the queue, passed to 'send' and 'destroy'
+ * @param cancel function that implements canceling a message
+ * @param impl_state for the queue, passed to 'send' and 'destroy'
  * @param handlers array of message handlers
  * @param error_handler handler for read and write errors
- * @param cls closure for handlers
+ * @param cls closure for message handlers and error handler
  * @return a new message queue
  */
 struct GNUNET_MQ_Handle *
@@ -411,8 +413,12 @@
 
 
 /**
- * Call the right callback for a message.
+ * Call the message message handler that was registered
+ * for the type of the given message in the given message queue.
  *
+ * This function is indended to be used for the implementation
+ * of message queues.
+ *
  * @param mq message queue with the handlers
  * @param mh message to dispatch
  */
@@ -422,9 +428,14 @@
 
 
 /**
- * Call the right callback for an error condition.
+ * Call the error handler of a message queue with the given
+ * error code.  If there is no error handler, log a warning.
  *
+ * This function is intended to be used for the implementation
+ * of message queues.
+ *
  * @param mq message queue
+ * @param error the error type
  */
 void
 GNUNET_MQ_inject_error (struct GNUNET_MQ_Handle *mq,

Modified: gnunet/src/include/gnunet_set_service.h
===================================================================
--- gnunet/src/include/gnunet_set_service.h     2013-06-25 20:51:44 UTC (rev 
27597)
+++ gnunet/src/include/gnunet_set_service.h     2013-06-25 23:37:13 UTC (rev 
27598)
@@ -156,7 +156,7 @@
 /**
  * Continuation used for some of the set operations
  *
- * @cls closure
+ * @param cls closure
  */
 typedef void (*GNUNET_SET_Continuation) (void *cls);
 
@@ -330,7 +330,7 @@
 GNUNET_SET_accept (struct GNUNET_SET_Request *request,
                    enum GNUNET_SET_ResultMode result_mode,
                    GNUNET_SET_ResultIterator result_cb,
-                   void *cls);
+                   void *result_cls);
 
 
 /**

Modified: gnunet/src/include/gnunet_stream_lib.h
===================================================================
--- gnunet/src/include/gnunet_stream_lib.h      2013-06-25 20:51:44 UTC (rev 
27597)
+++ gnunet/src/include/gnunet_stream_lib.h      2013-06-25 23:37:13 UTC (rev 
27598)
@@ -401,6 +401,7 @@
  * @param socket the socket to read/write in the message queue
  * @param msg_handlers message handler array
  * @param error_handler callback for errors
+ * @param cls closure for message handlers and error handler
  * @return the message queue for the socket
  */
 struct GNUNET_MQ_Handle *

Modified: gnunet/src/set/gnunet-service-set.c
===================================================================
--- gnunet/src/set/gnunet-service-set.c 2013-06-25 20:51:44 UTC (rev 27597)
+++ gnunet/src/set/gnunet-service-set.c 2013-06-25 23:37:13 UTC (rev 27598)
@@ -251,6 +251,8 @@
  * another peer.
  *
  * @param cls the incoming socket
+ * @param tunnel the tunnel that sent the message
+ * @param tunnel_ctx the tunnel context
  * @param mh the message
  */
 static int
@@ -524,7 +526,6 @@
     return;
   }
 
-
   switch (set->operation)
   {
     case GNUNET_SET_OPERATION_INTERSECTION:
@@ -694,6 +695,8 @@
   struct Incoming *incoming;
   struct TunnelContext *tc;
 
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO, "new incoming tunnel\n");
+
   GNUNET_assert (port == GNUNET_APPLICATION_TYPE_SET);
   tc = GNUNET_new (struct TunnelContext);
   incoming = GNUNET_new (struct Incoming);

Modified: gnunet/src/set/gnunet-service-set.h
===================================================================
--- gnunet/src/set/gnunet-service-set.h 2013-06-25 20:51:44 UTC (rev 27597)
+++ gnunet/src/set/gnunet-service-set.h 2013-06-25 23:37:13 UTC (rev 27598)
@@ -257,7 +257,7 @@
  * a remote peer.
  *
  * @param m the evaluate request message from the client
- * @parem set the set to evaluate the operation with
+ * @param set the set to evaluate the operation with
  */
 void
 _GSS_union_evaluate (struct GNUNET_SET_EvaluateMessage *m, struct Set *set);
@@ -287,7 +287,7 @@
 /**
  * Destroy a set that supports the union operation
  *
- * @param the set to destroy, must be of type GNUNET_SET_OPERATION_UNION
+ * @param set the set to destroy, must be of type GNUNET_SET_OPERATION_UNION
  */
 void
 _GSS_union_set_destroy (struct Set *set);

Modified: gnunet/src/set/gnunet-service-set_intersection.c
===================================================================
--- gnunet/src/set/gnunet-service-set_intersection.c    2013-06-25 20:51:44 UTC 
(rev 27597)
+++ gnunet/src/set/gnunet-service-set_intersection.c    2013-06-25 23:37:13 UTC 
(rev 27598)
@@ -1287,7 +1287,7 @@
 /**
  * Destroy a set that supports the union operation
  *
- * @param the set to destroy, must be of type GNUNET_SET_OPERATION_UNION
+ * @param set the set to destroy, must be of type GNUNET_SET_OPERATION_UNION
  */
 void
 _GSS_union_set_destroy (struct Set *set)

Modified: gnunet/src/set/gnunet-service-set_union.c
===================================================================
--- gnunet/src/set/gnunet-service-set_union.c   2013-06-25 20:51:44 UTC (rev 
27597)
+++ gnunet/src/set/gnunet-service-set_union.c   2013-06-25 23:37:13 UTC (rev 
27598)
@@ -493,7 +493,8 @@
   struct GNUNET_MQ_Envelope *mqm;
   struct OperationRequestMessage *msg;
 
-  mqm = GNUNET_MQ_msg_nested_mh (msg, 
GNUNET_MESSAGE_TYPE_SET_P2P_OPERATION_REQUEST, eo->context_msg);
+  mqm = GNUNET_MQ_msg_nested_mh (msg, 
GNUNET_MESSAGE_TYPE_SET_P2P_OPERATION_REQUEST,
+                                 eo->context_msg);
 
   if (NULL == mqm)
   {
@@ -1287,7 +1288,7 @@
 /**
  * Destroy a set that supports the union operation
  *
- * @param the set to destroy, must be of type GNUNET_SET_OPERATION_UNION
+ * @param set the set to destroy, must be of type GNUNET_SET_OPERATION_UNION
  */
 void
 _GSS_union_set_destroy (struct Set *set)

Modified: gnunet/src/set/gnunet-set-profiler.c
===================================================================
--- gnunet/src/set/gnunet-set-profiler.c        2013-06-25 20:51:44 UTC (rev 
27597)
+++ gnunet/src/set/gnunet-set-profiler.c        2013-06-25 23:37:13 UTC (rev 
27598)
@@ -38,7 +38,7 @@
 
 static unsigned int salt = 42;
 
-static char* op_str = "union";
+static char *op_str = "union";
 
 const static struct GNUNET_CONFIGURATION_Handle *config;
 
@@ -157,6 +157,7 @@
                struct GNUNET_SET_Request *request)
 {
   GNUNET_assert (NULL == set_oh2);
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO, "set listen cb called\n");
   set_oh2 = GNUNET_SET_accept (request, GNUNET_SET_RESULT_ADDED,
                                set_result_cb_2, NULL);
   GNUNET_SET_commit (set_oh2, set_b);

Modified: gnunet/src/set/set_api.c
===================================================================
--- gnunet/src/set/set_api.c    2013-06-25 20:51:44 UTC (rev 27597)
+++ gnunet/src/set/set_api.c    2013-06-25 23:37:13 UTC (rev 27598)
@@ -400,14 +400,14 @@
  * @param result_mode specified how results will be returned,
  *        see 'GNUNET_SET_ResultMode'.
  * @param result_cb callback for the results
- * @param cls closure for result_cb
+ * @param result_cls closure for result_cb
  * @return a handle to cancel the operation
  */
 struct GNUNET_SET_OperationHandle *
 GNUNET_SET_accept (struct GNUNET_SET_Request *request,
                    enum GNUNET_SET_ResultMode result_mode,
                    GNUNET_SET_ResultIterator result_cb,
-                   void *cls)
+                   void *result_cls)
 {
   struct GNUNET_MQ_Envelope *mqm;
   struct GNUNET_SET_OperationHandle *oh;
@@ -418,7 +418,7 @@
 
   oh = GNUNET_new (struct GNUNET_SET_OperationHandle);
   oh->result_cb = result_cb;
-  oh->result_cls = cls;
+  oh->result_cls = result_cls;
 
   mqm = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_SET_ACCEPT);
   msg->accept_reject_id = htonl (request->accept_id);

Modified: gnunet/src/stream/stream_api.c
===================================================================
--- gnunet/src/stream/stream_api.c      2013-06-25 20:51:44 UTC (rev 27597)
+++ gnunet/src/stream/stream_api.c      2013-06-25 23:37:13 UTC (rev 27598)
@@ -3934,6 +3934,7 @@
  * @param socket the socket to read/write in the message queue
  * @param msg_handlers message handler array
  * @param error_handler callback for errors
+ * @param cls closure for message handlers and error handler
  * @return the message queue for the socket
  */
 struct GNUNET_MQ_Handle *

Modified: gnunet/src/util/mq.c
===================================================================
--- gnunet/src/util/mq.c        2013-06-25 20:51:44 UTC (rev 27597)
+++ gnunet/src/util/mq.c        2013-06-25 23:37:13 UTC (rev 27598)
@@ -167,11 +167,13 @@
 };
 
 
-
-
 /**
- * Call the right callback for a message.
+ * Call the message message handler that was registered
+ * for the type of the given message in the given message queue.
  *
+ * This function is indended to be used for the implementation
+ * of message queues.
+ *
  * @param mq message queue with the handlers
  * @param mh message to dispatch
  */
@@ -199,9 +201,14 @@
 
 
 /**
- * Call the right callback for an error condition.
+ * Call the error handler of a message queue with the given
+ * error code.  If there is no error handler, log a warning.
  *
+ * This function is intended to be used by the implementation
+ * of message queues.
+ *
  * @param mq message queue
+ * @param error the error type
  */
 void
 GNUNET_MQ_inject_error (struct GNUNET_MQ_Handle *mq,
@@ -230,7 +237,7 @@
  * May only be called once per message.
  * 
  * @param mq message queue
- * @param ev the message to send.
+ * @param ev the envelope with the message to send.
  */
 void
 GNUNET_MQ_send (struct GNUNET_MQ_Handle *mq, struct GNUNET_MQ_Envelope *ev)
@@ -288,10 +295,11 @@
  *
  * @param send function the implements sending messages
  * @param destroy function that implements destroying the queue
- * @param destroy function that implements canceling a message
- * @param state for the queue, passed to 'send' and 'destroy'
+ * @param cancel function that implements canceling a message
+ * @param impl_state for the queue, passed to 'send' and 'destroy'
  * @param handlers array of message handlers
  * @param error_handler handler for read and write errors
+ * @param cls closure for message handlers and error handler
  * @return a new message queue
  */
 struct GNUNET_MQ_Handle *
@@ -391,6 +399,15 @@
 }
 
 
+/**
+ * Implementation of the GNUNET_MQ_msg_nested_mh macro.
+ *
+ * @param mhp pointer to the message header pointer that will be changed to 
allocate at
+ *        the newly allocated space for the message.
+ * @param base_size size of the data before the nested message
+ * @param type type of the message in the envelope
+ * @param nested_mh the message to append to the message after base_size
+ */
 struct GNUNET_MQ_Envelope *
 GNUNET_MQ_msg_nested_mh_ (struct GNUNET_MessageHeader **mhp, uint16_t 
base_size, uint16_t type,
                           const struct GNUNET_MessageHeader *nested_mh)
@@ -633,7 +650,6 @@
  * Associate the assoc_data in mq with a unique request id.
  *
  * @param mq message queue, id will be unique for the queue
- * @param mqm message to associate
  * @param assoc_data to associate
  */
 uint32_t




reply via email to

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