return;
}
- if (GNUNET_OK != compare_ats(atsi, ats_count, test_ats_info, test_ats_count))
+ if ((ats_count != test_ats_count) ||
+ (GNUNET_OK != compare_ats(atsi, ats_count, test_ats_info, test_ats_count)))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Stage 0: Callback with incorrect ats info \n");
ret = 1;
test_ats_info[0].type = htonl (GNUNET_ATS_NETWORK_TYPE);
test_ats_info[0].value = htonl(GNUNET_ATS_NET_WAN);
test_ats_info[1].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
- test_ats_info[1].value = htonl(3);
- test_ats_info[1].type = htonl (GNUNET_ATS_QUALITY_NET_DELAY);
- test_ats_info[1].value = htonl(30);
- test_ats_count = 2;
+ test_ats_info[1].value = htonl(5);
+ test_ats_info[2].type = htonl (GNUNET_ATS_QUALITY_NET_DELAY);
+ test_ats_info[2].value = htonl(30);
+ test_ats_count = 3;
GNUNET_ATS_address_update (sched_ats, &test_hello_address, test_session, test_ats_info, test_ats_count);
ret = 1;
}
- if (GNUNET_OK != compare_ats(atsi, ats_count, test_ats_info, test_ats_count))
+ if ((ats_count != test_ats_count) ||
+ (GNUNET_OK != compare_ats(atsi, ats_count, test_ats_info, test_ats_count)))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Stage 1: Callback with incorrect ats info \n");
ret = 1;
/* Prepare ATS Information */
test_ats_info[0].type = htonl (GNUNET_ATS_NETWORK_TYPE);
test_ats_info[0].value = htonl(GNUNET_ATS_NET_WAN);
- test_ats_info[1].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
- test_ats_info[1].value = htonl(1);
test_ats_info[1].type = htonl (GNUNET_ATS_QUALITY_NET_DELAY);
test_ats_info[1].value = htonl(10);
test_ats_count = 2;