bandwidth_changed_cb (void *cls,
struct ATS_Address *address)
{
- if ( (0 == ntohl (address->assigned_bw_out.value__)) &&
- (0 == ntohl (address->assigned_bw_in.value__)) )
+ if ( (0 == address->assigned_bw_out) && (0 == address->assigned_bw_in) )
return;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Bandwidth changed addresses %s %p to %u Bps out / %u Bps in\n",
GNUNET_i2s (&address->peer),
address,
- (unsigned int) ntohl (address->assigned_bw_out.value__),
- (unsigned int) ntohl (address->assigned_bw_in.value__));
+ address->assigned_bw_out,
+ address->assigned_bw_in);
if (GNUNET_YES == ph.bulk_running)
GNUNET_break (0);
return;
if (0 == cp)
continue;
if (NULL == cur)
+ {
GNUNET_break (0);
+ fprintf (stderr,
+ "Missing result for %u peers\n", cp);
+ }
if (GNUNET_NO == cur->valid)
cur_upd_res = ph.iterations_results[c_iteration].update_results_array[c_peer];
data_upd_tmp = GNUNET_strdup (data_upd_str);
GNUNET_free (data_upd_str);
- GNUNET_asprintf (&data_upd_str, "%s;%llu", data_upd_tmp,
+ if (GNUNET_YES == cur_full_res->valid)
+ {
+ GNUNET_asprintf (&data_upd_str, "%s;%llu", data_upd_tmp,
(NULL == cur_upd_res) ? 0 : cur_upd_res->d_total_full.rel_value_us);
+ }
+ else
+ {
+ GNUNET_asprintf (&data_upd_str, "%s;", data_upd_tmp);
+ }
GNUNET_free (data_upd_tmp);
}
data_tmp = GNUNET_strdup (data_str);
GNUNET_free (data_str);
- GNUNET_asprintf (&data_str, "%s;%llu", data_tmp, cur_full_res->d_total_full.rel_value_us);
+ if (GNUNET_YES == cur_full_res->valid)
+ {
+ GNUNET_asprintf (&data_str, "%s;%llu", data_tmp,
+ cur_full_res->d_total_full.rel_value_us);
+ }
+ else
+ {
+ GNUNET_asprintf (&data_str, "%s;", data_tmp);
+ }
+
GNUNET_free (data_tmp);
}
data_tmp = GNUNET_strdup (data_str);
GNUNET_asprintf (&data_upd_str, "%s\n", data_upd_tmp);
GNUNET_free (data_upd_tmp);
- fprintf (stderr, "Result updated solution: %s\n", data_upd_str);
+ fprintf (stderr, "Result updated solution: `%s'\n", data_upd_str);
if (GNUNET_SYSERR == GNUNET_DISK_file_write (f_update, data_upd_str, strlen(data_upd_str)))
GNUNET_break (0);
GNUNET_free (data_upd_str);