diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-02-26 09:04:26 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-02-26 09:04:26 +0000 |
commit | 6bed1381ac84900728ed55e6ecee9ff3db178a1a (patch) | |
tree | 9e67ce9ce87fb28f9f1b0d6f2d135f984139cc37 /src | |
parent | c25d299397f120441f96413c10a5278feb6fd69c (diff) | |
download | gnunet-6bed1381ac84900728ed55e6ecee9ff3db178a1a.tar.gz gnunet-6bed1381ac84900728ed55e6ecee9ff3db178a1a.zip |
fix for test
Diffstat (limited to 'src')
-rw-r--r-- | src/ats/test_ats_mlp.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/ats/test_ats_mlp.c b/src/ats/test_ats_mlp.c index c23496399..c110fad29 100644 --- a/src/ats/test_ats_mlp.c +++ b/src/ats/test_ats_mlp.c | |||
@@ -68,20 +68,6 @@ struct ATS_Address *address[3]; | |||
68 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 68 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; |
69 | 69 | ||
70 | 70 | ||
71 | #if 0 | ||
72 | |||
73 | #define MLP_MAX_EXEC_DURATION GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 3) | ||
74 | #define MLP_MAX_ITERATIONS INT_MAX | ||
75 | |||
76 | static void | ||
77 | set_ats (struct GNUNET_ATS_Information *ats, uint32_t type, uint32_t value) | ||
78 | { | ||
79 | ats->type = type; | ||
80 | ats->value = value; | ||
81 | } | ||
82 | |||
83 | #endif | ||
84 | |||
85 | int addr_it (void *cls, | 71 | int addr_it (void *cls, |
86 | const struct GNUNET_HashCode * key, | 72 | const struct GNUNET_HashCode * key, |
87 | void *value) | 73 | void *value) |
@@ -125,13 +111,14 @@ end_now (int res) | |||
125 | static void | 111 | static void |
126 | end_correctly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 112 | end_correctly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
127 | { | 113 | { |
128 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Test ending with success\n")); | 114 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, _("Test ending with success\n")); |
129 | end_now (0); | 115 | end_now (0); |
130 | } | 116 | } |
131 | 117 | ||
132 | static void | 118 | static void |
133 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 119 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
134 | { | 120 | { |
121 | GNUNET_break (0); | ||
135 | timeout_task = GNUNET_SCHEDULER_NO_TASK; | 122 | timeout_task = GNUNET_SCHEDULER_NO_TASK; |
136 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Test ending with timeout\n")); | 123 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Test ending with timeout\n")); |
137 | end_now (1); | 124 | end_now (1); |
@@ -163,8 +150,11 @@ bandwidth_changed_cb (void *cls, struct ATS_Address *address) | |||
163 | 150 | ||
164 | if ((1 == cb_p0) && (1 == cb_p1)) | 151 | if ((1 == cb_p0) && (1 == cb_p1)) |
165 | GNUNET_SCHEDULER_add_now (&end_correctly, NULL); | 152 | GNUNET_SCHEDULER_add_now (&end_correctly, NULL); |
166 | else if ((1 > cb_p0) || (1 > cb_p1)) | 153 | else if ((1 < cb_p0) || (1 < cb_p1)) |
154 | { | ||
155 | GNUNET_break (0); | ||
167 | GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 156 | GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
157 | } | ||
168 | } | 158 | } |
169 | 159 | ||
170 | 160 | ||