[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r28412 - gnunet/src/ats
From: |
gnunet |
Subject: |
[GNUnet-SVN] r28412 - gnunet/src/ats |
Date: |
Tue, 6 Aug 2013 12:31:41 +0200 |
Author: wachs
Date: 2013-08-06 12:31:41 +0200 (Tue, 06 Aug 2013)
New Revision: 28412
Modified:
gnunet/src/ats/perf_ats.c
Log:
connects only with valgrind?!
Modified: gnunet/src/ats/perf_ats.c
===================================================================
--- gnunet/src/ats/perf_ats.c 2013-08-06 10:15:28 UTC (rev 28411)
+++ gnunet/src/ats/perf_ats.c 2013-08-06 10:31:41 UTC (rev 28412)
@@ -28,7 +28,7 @@
#include "gnunet_testbed_service.h"
#include "gnunet_ats_service.h"
-#define TEST_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
5)
+#define TEST_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
10)
#define TESTNAME_PREFIX "perf_ats_"
#define DEFAULT_NUM 5
@@ -253,6 +253,26 @@
p->connect_op = NULL;
}
+static void
+do_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+ int c_p;
+ for (c_p = 1; c_p < peers; c_p ++)
+ {
+ ph[c_p].connect_op = GNUNET_TESTBED_overlay_connect( NULL,
+ &connect_completion_callback, &ph[c_p],
ph[0].peer, ph[c_p].peer);
+ if (NULL == ph[c_p].connect_op)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ _("Could not connect peer 0 and peer
%u\n"), c_p);
+ GNUNET_break (0);
+ if (GNUNET_SCHEDULER_NO_TASK != shutdown_task)
+ GNUNET_SCHEDULER_cancel(shutdown_task);
+ shutdown_task = GNUNET_SCHEDULER_add_now (do_shutdown,
NULL);
+ return;
+ }
+ }
+}
/**
* Callback to be called when a service connect operation is completed
@@ -287,28 +307,7 @@
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("Initialization done, connecting peers\n"));
- for (c_p = 1; c_p < peers; c_p ++)
- {
- ph[c_p].connect_op = GNUNET_TESTBED_overlay_connect(
NULL,
- &connect_completion_callback, &ph[c_p],
ph[0].peer, ph[c_p].peer);
- /*
- if (NULL == ph[c_p].connect_op)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("Could not connect peer 0 and
peer %u\n"), c_p);
- GNUNET_break (0);
- if (GNUNET_SCHEDULER_NO_TASK != shutdown_task)
- GNUNET_SCHEDULER_cancel(shutdown_task);
- shutdown_task = GNUNET_SCHEDULER_add_now
(do_shutdown, NULL);
- return;
- }
- else
- {
- GNUNET_break (0);
- }
- */
- }
-
+ GNUNET_SCHEDULER_add_now (&do_connect, NULL);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r28412 - gnunet/src/ats,
gnunet <=