aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_transport_api_monitor_validation.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/test_transport_api_monitor_validation.c')
-rw-r--r--src/transport/test_transport_api_monitor_validation.c49
1 files changed, 28 insertions, 21 deletions
diff --git a/src/transport/test_transport_api_monitor_validation.c b/src/transport/test_transport_api_monitor_validation.c
index 261f1a7d0..12be8584e 100644
--- a/src/transport/test_transport_api_monitor_validation.c
+++ b/src/transport/test_transport_api_monitor_validation.c
@@ -392,43 +392,50 @@ start_cb (struct PeerContext *p, void *cls)
392 392
393static void 393static void
394monitor1_cb (void *cls, 394monitor1_cb (void *cls,
395 const struct GNUNET_PeerIdentity *peer, 395 const struct GNUNET_HELLO_Address *address,
396 const struct GNUNET_HELLO_Address *address, 396 struct GNUNET_TIME_Absolute last_validation,
397 struct GNUNET_TIME_Absolute last_validation, 397 struct GNUNET_TIME_Absolute valid_until,
398 struct GNUNET_TIME_Absolute valid_until, 398 struct GNUNET_TIME_Absolute next_validation,
399 struct GNUNET_TIME_Absolute next_validation, 399 enum GNUNET_TRANSPORT_ValidationState state)
400 enum GNUNET_TRANSPORT_ValidationState state)
401{ 400{
402 if ((NULL == peer) || (NULL == p1)) 401 if ((NULL == address) || (NULL == p1))
403 return; 402 return;
404 403
405 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Monitor 1: %s %s %s\n", 404 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
406 GNUNET_i2s (peer), GNUNET_TRANSPORT_vs2s(state), GNUNET_STRINGS_absolute_time_to_string(valid_until)); 405 "Monitor 1: %s %s %s\n",
407 if (0 == memcmp (peer, &p2->id, sizeof (p2->id))) 406 GNUNET_i2s (&address->peer),
407 GNUNET_TRANSPORT_vs2s (state),
408 GNUNET_STRINGS_absolute_time_to_string(valid_until));
409 if (0 == memcmp (&address->peer,
410 &p2->id,
411 sizeof (p2->id)))
408 p1_c++; 412 p1_c++;
409} 413}
410 414
411 415
412static void 416static void
413monitor2_cb (void *cls, 417monitor2_cb (void *cls,
414 const struct GNUNET_PeerIdentity *peer, 418 const struct GNUNET_HELLO_Address *address,
415 const struct GNUNET_HELLO_Address *address, 419 struct GNUNET_TIME_Absolute last_validation,
416 struct GNUNET_TIME_Absolute last_validation, 420 struct GNUNET_TIME_Absolute valid_until,
417 struct GNUNET_TIME_Absolute valid_until, 421 struct GNUNET_TIME_Absolute next_validation,
418 struct GNUNET_TIME_Absolute next_validation, 422 enum GNUNET_TRANSPORT_ValidationState state)
419 enum GNUNET_TRANSPORT_ValidationState state)
420{ 423{
421 if ((NULL == peer) || (NULL == p2)) 424 if ((NULL == address) || (NULL == p2))
422 return; 425 return;
423 426
424 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Monitor 2: %s %s %s\n", 427 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
425 GNUNET_i2s (peer), GNUNET_TRANSPORT_vs2s(state), GNUNET_STRINGS_absolute_time_to_string(valid_until)); 428 "Monitor 2: %s %s %s\n",
426 if (0 == memcmp (peer, &p1->id, sizeof (p1->id))) 429 GNUNET_i2s (&address->peer),
430 GNUNET_TRANSPORT_vs2s(state),
431 GNUNET_STRINGS_absolute_time_to_string(valid_until));
432 if (0 == memcmp (&address->peer,
433 &p1->id,
434 sizeof (p1->id)))
427 p2_c++; 435 p2_c++;
428} 436}
429 437
430 438
431
432static void 439static void
433run (void *cls, char *const *args, const char *cfgfile, 440run (void *cls, char *const *args, const char *cfgfile,
434 const struct GNUNET_CONFIGURATION_Handle *cfg) 441 const struct GNUNET_CONFIGURATION_Handle *cfg)