gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r26206 - gnunet/src/ats


From: gnunet
Subject: [GNUnet-SVN] r26206 - gnunet/src/ats
Date: Tue, 26 Feb 2013 10:04:26 +0100

Author: wachs
Date: 2013-02-26 10:04:26 +0100 (Tue, 26 Feb 2013)
New Revision: 26206

Modified:
   gnunet/src/ats/test_ats_mlp.c
Log:
fix for test


Modified: gnunet/src/ats/test_ats_mlp.c
===================================================================
--- gnunet/src/ats/test_ats_mlp.c       2013-02-25 16:27:00 UTC (rev 26205)
+++ gnunet/src/ats/test_ats_mlp.c       2013-02-26 09:04:26 UTC (rev 26206)
@@ -68,20 +68,6 @@
 GNUNET_SCHEDULER_TaskIdentifier timeout_task;
 
 
-#if 0
-
-#define MLP_MAX_EXEC_DURATION   
GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 3)
-#define MLP_MAX_ITERATIONS      INT_MAX
-
-static void
-set_ats (struct GNUNET_ATS_Information *ats, uint32_t type, uint32_t value)
-{
-  ats->type = type;
-  ats->value = value;
-}
-
-#endif
-
 int addr_it (void *cls,
              const struct GNUNET_HashCode * key,
              void *value)
@@ -125,13 +111,14 @@
 static void
 end_correctly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-  GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Test ending with success\n"));
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, _("Test ending with success\n"));
        end_now (0);
 }
 
 static void
 end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
+       GNUNET_break (0);
        timeout_task = GNUNET_SCHEDULER_NO_TASK;
   GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Test ending with timeout\n"));
        end_now (1);
@@ -163,8 +150,11 @@
 
   if ((1 == cb_p0) && (1 == cb_p1))
                GNUNET_SCHEDULER_add_now (&end_correctly, NULL);
-  else if ((1 > cb_p0) || (1 > cb_p1))
+  else if ((1 < cb_p0) || (1 < cb_p1))
+  {
+               GNUNET_break (0);
                GNUNET_SCHEDULER_add_now (&end_badly, NULL);
+  }
 }
 
 




reply via email to

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