gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r24408 - gnunet/src/mesh


From: gnunet
Subject: [GNUnet-SVN] r24408 - gnunet/src/mesh
Date: Thu, 18 Oct 2012 22:08:12 +0200

Author: bartpolot
Date: 2012-10-18 22:08:12 +0200 (Thu, 18 Oct 2012)
New Revision: 24408

Modified:
   gnunet/src/mesh/test_mesh_small.c
Log:
- adapt to longer execution time while timing out soon on stall

Modified: gnunet/src/mesh/test_mesh_small.c
===================================================================
--- gnunet/src/mesh/test_mesh_small.c   2012-10-18 18:01:49 UTC (rev 24407)
+++ gnunet/src/mesh/test_mesh_small.c   2012-10-18 20:08:12 UTC (rev 24408)
@@ -56,7 +56,7 @@
 /**
  * Time to wait for stuff that should be rather fast
  */
-#define SHORT_TIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
+#define SHORT_TIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10)
 
 /**
  * DIFFERENT TESTS TO RUN
@@ -389,7 +389,7 @@
 /**
  * Transmit ready callback.
  * 
- * @param cls Closure (peer #).
+ * @param cls Closure (message type).
  * @param size Size of the tranmist buffer.
  * @param buf Pointer to the beginning of the buffer.
  * 
@@ -458,7 +458,7 @@
 /**
  * Transmit ready callback
  *
- * @param cls Closure.
+ * @param cls Closure (message type).
  * @param size Size of the buffer we have.
  * @param buf Buffer to copy data to.
  */
@@ -509,6 +509,18 @@
   long expected_target_client;
 
   ok++;
+
+  if ((ok % 20) == 0)
+  {
+    if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
+    {
+      GNUNET_SCHEDULER_cancel (disconnect_task);
+      disconnect_task =
+              GNUNET_SCHEDULER_add_delayed (SHORT_TIME, &disconnect_mesh_peers,
+                                            NULL);
+    }
+  }
+
   switch (client)
   {
   case 1L:
@@ -756,6 +768,7 @@
       dest = NULL;
       break;
     default:
+      GNUNET_assert (0);
       return;
   }
   if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)




reply via email to

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