gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r28151 - in gnunet/src: include mesh


From: gnunet
Subject: [GNUnet-SVN] r28151 - in gnunet/src: include mesh
Date: Thu, 18 Jul 2013 13:53:49 +0200

Author: bartpolot
Date: 2013-07-18 13:53:49 +0200 (Thu, 18 Jul 2013)
New Revision: 28151

Modified:
   gnunet/src/include/gnunet_mesh_service.h
   gnunet/src/mesh/gnunet-service-mesh.c
   gnunet/src/mesh/mesh_api.c
Log:
- doc, warnings

Modified: gnunet/src/include/gnunet_mesh_service.h
===================================================================
--- gnunet/src/include/gnunet_mesh_service.h    2013-07-18 11:50:11 UTC (rev 
28150)
+++ gnunet/src/include/gnunet_mesh_service.h    2013-07-18 11:53:49 UTC (rev 
28151)
@@ -186,8 +186,9 @@
  * @param cfg Configuration to use.
  * @param cls Closure for the various callbacks that follow (including 
  *            handlers in the handlers array).
- * @param new_tunnel Function called when an *inbound* tunnel is created.
+ * @param new_tunnel Function called when an *incoming* tunnel is created.
  *                   Can be NULL if no inbound tunnels are desired.
+ *                   See @c ports.
  * @param cleaner Function called when a tunnel is destroyed by the remote 
peer.
  *                It is NOT called if GNUNET_MESH_tunnel_destroy is called on
  *                the tunnel.
@@ -196,6 +197,7 @@
  *                 receive the next message.  Messages of a type that is not
  *                 in the handlers array are ignored if received. 
  * @param ports NULL or 0-terminated array of port numbers for incoming 
tunnels.
+ *              See @c new_tunnel.
  * 
  * @return handle to the mesh service NULL on error
  *         (in this case, init is never called)

Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c       2013-07-18 11:50:11 UTC (rev 
28150)
+++ gnunet/src/mesh/gnunet-service-mesh.c       2013-07-18 11:53:49 UTC (rev 
28151)
@@ -2669,7 +2669,7 @@
 
 
 /**
- * Cancel all transmissions towards a neighbor that belongs to a certain 
tunnel.
+ * Cancel all transmissions towards a neighbor that belong to a certain tunnel.
  *
  * @param t Tunnel which to cancel.
  * @param neighbor Short ID of the neighbor to whom cancel the transmissions.

Modified: gnunet/src/mesh/mesh_api.c
===================================================================
--- gnunet/src/mesh/mesh_api.c  2013-07-18 11:50:11 UTC (rev 28150)
+++ gnunet/src/mesh/mesh_api.c  2013-07-18 11:53:49 UTC (rev 28151)
@@ -1320,6 +1320,18 @@
   h->reconnect_time = GNUNET_TIME_UNIT_MILLISECONDS;
   h->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
 
+  if (NULL != ports && ports[0] != 0 && NULL == new_tunnel)
+  {
+    GNUNET_break (0);
+    LOG (GNUNET_ERROR_TYPE_DEBUG,
+         "no new tunnel handler given, ports parameter is useless!!\n");
+  }
+  if ((NULL == ports || ports[0] == 0) && NULL != new_tunnel)
+  {
+    GNUNET_break (0);
+    LOG (GNUNET_ERROR_TYPE_DEBUG,
+         "no ports given, new tunnel handler will never be called!!\n");
+  }
   /* count handlers */
   for (h->n_handlers = 0;
        handlers && handlers[h->n_handlers].type;




reply via email to

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