aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-20 13:17:40 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-20 13:17:40 +0000
commit9b68602172984414812bd244c06e3786716a7471 (patch)
tree24a32b22ea3617161820890c1e62362baaaa7924 /src/core
parentde4fc4681c1924073a9812f025e979897e814099 (diff)
downloadgnunet-9b68602172984414812bd244c06e3786716a7471.tar.gz
gnunet-9b68602172984414812bd244c06e3786716a7471.zip
fix use of ok
Diffstat (limited to 'src/core')
-rw-r--r--src/core/test_core_quota_compliance.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c
index 1092d5e48..51ed48916 100644
--- a/src/core/test_core_quota_compliance.c
+++ b/src/core/test_core_quota_compliance.c
@@ -245,9 +245,9 @@ measurement_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
245 245
246 if ((throughput_out > (max_quota_out + quota_delta)) || 246 if ((throughput_out > (max_quota_out + quota_delta)) ||
247 (throughput_in > (max_quota_in + quota_delta))) 247 (throughput_in > (max_quota_in + quota_delta)))
248 ok = GNUNET_NO; 248 ok = 1;
249 else 249 else
250 ok = GNUNET_YES; 250 ok = 0;
251 GNUNET_STATISTICS_get (p1.stats, "core", "# discarded CORE_SEND requests", 251 GNUNET_STATISTICS_get (p1.stats, "core", "# discarded CORE_SEND requests",
252 GNUNET_TIME_UNIT_FOREVER_REL, NULL, &print_stat, &p1); 252 GNUNET_TIME_UNIT_FOREVER_REL, NULL, &print_stat, &p1);
253 253
@@ -273,23 +273,23 @@ measurement_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
273 "# discarded lower priority CORE_SEND request bytes", 273 "# discarded lower priority CORE_SEND request bytes",
274 GNUNET_TIME_UNIT_FOREVER_REL, NULL, &print_stat, &p2); 274 GNUNET_TIME_UNIT_FOREVER_REL, NULL, &print_stat, &p2);
275 275
276 if (ok == GNUNET_NO) 276 if (ok != 0)
277 kind = GNUNET_ERROR_TYPE_ERROR; 277 kind = GNUNET_ERROR_TYPE_ERROR;
278 switch (test) 278 switch (test)
279 { 279 {
280 case SYMMETRIC: 280 case SYMMETRIC:
281 GNUNET_log (kind, "Core quota compliance test with symmetric quotas: %s\n", 281 GNUNET_log (kind, "Core quota compliance test with symmetric quotas: %s\n",
282 (ok == GNUNET_YES) ? "PASSED" : "FAILED"); 282 (ok != 0) ? "PASSED" : "FAILED");
283 break; 283 break;
284 case ASYMMETRIC_SEND_LIMITED: 284 case ASYMMETRIC_SEND_LIMITED:
285 GNUNET_log (kind, 285 GNUNET_log (kind,
286 "Core quota compliance test with limited sender quota: %s\n", 286 "Core quota compliance test with limited sender quota: %s\n",
287 (ok == GNUNET_YES) ? "PASSED" : "FAILED"); 287 (ok != 0) ? "PASSED" : "FAILED");
288 break; 288 break;
289 case ASYMMETRIC_RECV_LIMITED: 289 case ASYMMETRIC_RECV_LIMITED:
290 GNUNET_log (kind, 290 GNUNET_log (kind,
291 "Core quota compliance test with limited receiver quota: %s\n", 291 "Core quota compliance test with limited receiver quota: %s\n",
292 (ok == GNUNET_YES) ? "PASSED" : "FAILED"); 292 (ok != 0) ? "PASSED" : "FAILED");
293 break; 293 break;
294 }; 294 };
295 GNUNET_log (kind, "Peer 1 send rate: %llu b/s (%llu bytes in %llu ms)\n", 295 GNUNET_log (kind, "Peer 1 send rate: %llu b/s (%llu bytes in %llu ms)\n",