[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r26106 - gnunet/src/ats
From: |
gnunet |
Subject: |
[GNUnet-SVN] r26106 - gnunet/src/ats |
Date: |
Thu, 14 Feb 2013 14:36:20 +0100 |
Author: wachs
Date: 2013-02-14 14:36:19 +0100 (Thu, 14 Feb 2013)
New Revision: 26106
Modified:
gnunet/src/ats/test_ats_mlp.c
Log:
mod test
Modified: gnunet/src/ats/test_ats_mlp.c
===================================================================
--- gnunet/src/ats/test_ats_mlp.c 2013-02-14 13:28:13 UTC (rev 26105)
+++ gnunet/src/ats/test_ats_mlp.c 2013-02-14 13:36:19 UTC (rev 26106)
@@ -62,6 +62,12 @@
*/
struct ATS_Address *address;
+/**
+ * Timeout task
+ */
+GNUNET_SCHEDULER_TaskIdentifier timeout_task;
+
+
#if 0
#define MLP_MAX_EXEC_DURATION
GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 3)
@@ -88,6 +94,11 @@
static void
end_now (int res)
{
+ if (GNUNET_SCHEDULER_NO_TASK != timeout_task)
+ {
+ GNUNET_SCHEDULER_cancel (timeout_task);
+ timeout_task = GNUNET_SCHEDULER_NO_TASK;
+ }
if (NULL != stats)
{
GNUNET_STATISTICS_destroy(stats, GNUNET_NO);
@@ -119,6 +130,12 @@
}
static void
+end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+ end_now (1);
+}
+
+static void
check (void *cls, char *const *args, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
@@ -132,6 +149,8 @@
return;
#endif
+ timeout_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL);
+
stats = GNUNET_STATISTICS_create("ats", cfg);
if (NULL == stats)
{
@@ -179,8 +198,6 @@
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST);
GAS_mlp_address_add (mlp, addresses, address);
-
-
end_now (0);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r26106 - gnunet/src/ats,
gnunet <=