aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2012-10-18 20:08:12 +0000
committerBart Polot <bart@net.in.tum.de>2012-10-18 20:08:12 +0000
commite7e8a8b46aae6e5b704bc2b46df494d08d88798a (patch)
treed527d5d9e6dbc468510638280969e66824753674 /src
parent2502a670c1ce1252ef388d28365120a2ee6ca2f2 (diff)
downloadgnunet-e7e8a8b46aae6e5b704bc2b46df494d08d88798a.tar.gz
gnunet-e7e8a8b46aae6e5b704bc2b46df494d08d88798a.zip
- adapt to longer execution time while timing out soon on stall
Diffstat (limited to 'src')
-rw-r--r--src/mesh/test_mesh_small.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/mesh/test_mesh_small.c b/src/mesh/test_mesh_small.c
index 474478e7f..0ffea36b4 100644
--- a/src/mesh/test_mesh_small.c
+++ b/src/mesh/test_mesh_small.c
@@ -56,7 +56,7 @@ struct MeshPeer
56/** 56/**
57 * Time to wait for stuff that should be rather fast 57 * Time to wait for stuff that should be rather fast
58 */ 58 */
59#define SHORT_TIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60) 59#define SHORT_TIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10)
60 60
61/** 61/**
62 * DIFFERENT TESTS TO RUN 62 * DIFFERENT TESTS TO RUN
@@ -389,7 +389,7 @@ disconnect_mesh_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
389/** 389/**
390 * Transmit ready callback. 390 * Transmit ready callback.
391 * 391 *
392 * @param cls Closure (peer #). 392 * @param cls Closure (message type).
393 * @param size Size of the tranmist buffer. 393 * @param size Size of the tranmist buffer.
394 * @param buf Pointer to the beginning of the buffer. 394 * @param buf Pointer to the beginning of the buffer.
395 * 395 *
@@ -458,7 +458,7 @@ data_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
458/** 458/**
459 * Transmit ready callback 459 * Transmit ready callback
460 * 460 *
461 * @param cls Closure. 461 * @param cls Closure (message type).
462 * @param size Size of the buffer we have. 462 * @param size Size of the buffer we have.
463 * @param buf Buffer to copy data to. 463 * @param buf Buffer to copy data to.
464 */ 464 */
@@ -509,6 +509,18 @@ data_callback (void *cls, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx,
509 long expected_target_client; 509 long expected_target_client;
510 510
511 ok++; 511 ok++;
512
513 if ((ok % 20) == 0)
514 {
515 if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
516 {
517 GNUNET_SCHEDULER_cancel (disconnect_task);
518 disconnect_task =
519 GNUNET_SCHEDULER_add_delayed (SHORT_TIME, &disconnect_mesh_peers,
520 NULL);
521 }
522 }
523
512 switch (client) 524 switch (client)
513 { 525 {
514 case 1L: 526 case 1L:
@@ -756,6 +768,7 @@ ch (void *cls, const struct GNUNET_PeerIdentity *peer,
756 dest = NULL; 768 dest = NULL;
757 break; 769 break;
758 default: 770 default:
771 GNUNET_assert (0);
759 return; 772 return;
760 } 773 }
761 if (GNUNET_SCHEDULER_NO_TASK != disconnect_task) 774 if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)