/**
* Transmit the next message to the arm service.
*
- * @param cls closure with the 'struct GNUNET_ARM_Handle'
- * @param size number of bytes available in buf
+ * @param cls closure with the `struct GNUNET_ARM_Handle`
+ * @param size number of bytes available in @a buf
* @param buf where the callee should write the message
- * @return number of bytes written to buf
+ * @return number of bytes written to @a buf
*/
static size_t
transmit_arm_message (void *cls, size_t size, void *buf)
notify_connection = GNUNET_NO;
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "transmit_arm_message is running with %p buffer of size %lu. ARM is known to be %s\n",
- buf, size, h->currently_down ? "unconnected" : "connected");
+ "transmit_arm_message is running with %p buffer of size %lu. ARM is known to be %s\n",
+ buf, size, h->currently_down ? "unconnected" : "connected");
GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == h->reconnect_task);
h->cth = NULL;
if ((GNUNET_YES == h->currently_down) && (NULL != buf))
}
if (NULL == (cm = h->control_pending_head))
{
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Queue is empty, not sending anything\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Queue is empty, not sending anything\n");
msize = 0;
goto end;
}
}
-
static int
-eval_count_active_it (void *cls, const struct GNUNET_PeerIdentity *id, void *obj)
+eval_count_active_it (void *cls,
+ const struct GNUNET_PeerIdentity *id,
+ void *obj)
{
int *request_fulfilled = cls;
struct ATS_Address *addr = obj;
/**
* Summary context
*/
-struct SummaryContext {
+struct SummaryContext
+{
/**
* Sum of the utilized inbound bandwidth per network
*/
static int
eval_sum_bw_used (void *cls, const struct GNUNET_PeerIdentity *id, void *obj)
{
+ struct SummaryContext *ctx = cls;
struct ATS_Address *addr = obj;
int networks[GNUNET_ATS_NetworkTypeCount] = GNUNET_ATS_NetworkType;
int net;
- struct SummaryContext *ctx = cls;
-
int c;
if (GNUNET_YES == addr->active)
}
}
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Active address in %s with (in/out) %lu/%lu Bps\n",
- GNUNET_ATS_print_network_type (net),
- ntohl (addr->assigned_bw_in.value__),
- ntohl (addr->assigned_bw_out.value__));
+ "Active address in %s with (in/out) %u/%u Bps\n",
+ GNUNET_ATS_print_network_type (net),
+ (unsigned int) ntohl (addr->assigned_bw_in.value__),
+ (unsigned int) ntohl (addr->assigned_bw_out.value__));
}
return GNUNET_OK;
}
+
/**
* Summary context
*/
-struct RelativityContext {
+struct RelativityContext
+{
struct GAS_Addresses_Handle *ah;
};
+
static int
find_active_address (void *cls, const struct GNUNET_PeerIdentity *id, void *obj)
{
}
if (NULL == cur)
{
- GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Nobody is interested in peer `%s' :(\n",
- GNUNET_i2s (&address->peer));
+ GNUNET_log(GNUNET_ERROR_TYPE_INFO,
+ "Nobody is interested in peer `%s' :(\n",
+ GNUNET_i2s (&address->peer));
return;
}
if ((0 == ntohl (address->assigned_bw_in.value__))
&& (0 == ntohl (address->assigned_bw_out.value__)))
{
- GNUNET_log(GNUNET_ERROR_TYPE_INFO,
- "Telling transport to disconnect peer `%s'\n",
- GNUNET_i2s (&address->peer));
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Telling transport to disconnect peer `%s'\n",
+ GNUNET_i2s (&address->peer));
}
else
{
GNUNET_log(GNUNET_ERROR_TYPE_INFO,
- "Sending bandwidth update for peer `%s': %lu %lu\n",
- GNUNET_i2s (&address->peer), address->assigned_bw_out.value__,
- address->assigned_bw_out.value__);
+ "Sending bandwidth update for peer `%s': %u %u\n",
+ GNUNET_i2s (&address->peer),
+ (unsigned int) ntohl (address->assigned_bw_out.value__),
+ (unsigned int) ntohl (address->assigned_bw_out.value__));
}
/* *Notify scheduling clients about suggestion */
address->atsi_count, address->assigned_bw_out, address->assigned_bw_in);
}
+
/**
* Initialize address subsystem. The addresses subsystem manages the addresses
* known and current performance information. It has a solver component
return;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Callback for peer `%s' plugin `%s' BW out %lu, BW in %lu \n",
+ "Callback for peer `%s' plugin `%s' BW out %u, BW in %u \n",
GNUNET_i2s (id),
plugin_name,
- ntohl (bandwidth_out.value__),
- ntohl (bandwidth_in.value__));
+ (unsigned int) ntohl (bandwidth_out.value__),
+ (unsigned int) ntohl (bandwidth_in.value__));
GAS_performance_notify_client(pc,
id,
plugin_name,
return;
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Callback for %s peer `%s' plugin `%s' BW out %lu, BW in %lu \n",
+ "Callback for %s peer `%s' plugin `%s' BW out %u, BW in %u\n",
(active == GNUNET_YES) ? "ACTIVE" : "INACTIVE",
GNUNET_i2s (id),
plugin_name,
- ntohl (bandwidth_out.value__),
- ntohl (bandwidth_in.value__));
+ (unsigned int) ntohl (bandwidth_out.value__),
+ (unsigned int) ntohl (bandwidth_in.value__));
/* Transmit result */
if ((GNUNET_YES == ai->all) || (GNUNET_YES == active))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Sending result for %s peer `%s' plugin `%s' BW out %lu, BW in %lu \n",
+ "Sending result for %s peer `%s' plugin `%s' BW out %u, BW in %u\n",
(active == GNUNET_YES) ? "ACTIVE" : "INACTIVE",
GNUNET_i2s (id),
plugin_name,
- ntohl (bandwidth_out.value__),
- ntohl (bandwidth_in.value__));
+ (unsigned int) ntohl (bandwidth_out.value__),
+ (unsigned int) ntohl (bandwidth_in.value__));
transmit_req_addr (cls,
- id,
- plugin_name,
- plugin_addr, plugin_addr_len,
- active,
- atsi,
- atsi_count,
- bandwidth_out, bandwidth_in);
+ id,
+ plugin_name,
+ plugin_addr, plugin_addr_len,
+ active,
+ atsi,
+ atsi_count,
+ bandwidth_out, bandwidth_in);
}
}
strcpy (&addrp[plugin_addr_len], plugin_name);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "ATS sends quota for peer `%s': (in/out) %lu/%lu\n",
- GNUNET_i2s (peer), ntohl (bandwidth_in.value__),
- ntohl (bandwidth_out.value__));
+ "ATS sends quota for peer `%s': (in/out) %u/%u\n",
+ GNUNET_i2s (peer),
+ (unsigned int) ntohl (bandwidth_in.value__),
+ (unsigned int) ntohl (bandwidth_out.value__));
GNUNET_SERVER_notification_context_unicast (nc, my_client, &msg->header,
GNUNET_YES);
}
-
static void
-bandwidth_changed_cb (void *cls, struct ATS_Address *address)
+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 == ntohl (address->assigned_bw_out.value__)) &&
+ (0 == ntohl (address->assigned_bw_in.value__)) )
return;
- GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
- "Bandwidth changed addresses %s %p to %lu Bps out / %lu Bps in\n",
- GNUNET_i2s (&address->peer),
- address,
- ntohl(address->assigned_bw_out.value__),
- ntohl(address->assigned_bw_in.value__));
+ 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__));
if (GNUNET_YES == ph.bulk_running)
GNUNET_break (0);
return;
}
+
const double *
get_preferences_cb (void *cls, const struct GNUNET_PeerIdentity *id)
{
GNUNET_assert (GNUNET_OK == ctx.mlp_result);
res[0] = GAS_mlp_get_preferred_address(mlp, addresses, &p[0]);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Preferred address `%s' outbound bandwidth: %lu Bps\n",res[0]->plugin, ntohl(res[0]->assigned_bw_out.value__));
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Preferred address `%s' outbound bandwidth: %u Bps\n",
+ res[0]->plugin,
+ (unsigned int) ntohl (res[0]->assigned_bw_out.value__));
/* Delete an address */
GNUNET_CONTAINER_multihashmap_remove (addresses, &addr[0].peer.hashPubKey, &addr[0]);
GNUNET_STATISTICS_destroy(stats, GNUNET_NO);
ret = 0;
- return;
}
if (0 == stage)
{
- /* Callback for initial suggestion */
- if (0 == memcmp (&address->peer, &p[0].id, sizeof (p[0].id)))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stage %u: Callback for peer 0 `%s': (in/out) %lu/%lu\n",
- stage,
- GNUNET_i2s (&address->peer),
- ntohl (bandwidth_in.value__),
- ntohl (bandwidth_out.value__));
- sug_p0 = GNUNET_YES;
- p0_last_bandwidth_out = ntohl(bandwidth_out.value__);
- p0_last_bandwidth_in = ntohl(bandwidth_in.value__);
- }
- if (0 == memcmp (&address->peer, &p[1].id, sizeof (p[1].id)))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stage %u: Callback for peer 1 `%s': (in/out) %lu/%lu\n",
- stage,
- GNUNET_i2s (&address->peer),
- ntohl (bandwidth_in.value__),
- ntohl (bandwidth_out.value__));
- sug_p1 = GNUNET_YES;
- p1_last_bandwidth_out = ntohl(bandwidth_out.value__);
- p1_last_bandwidth_in = ntohl(bandwidth_in.value__);
- }
- if ((GNUNET_YES == sug_p0) && (GNUNET_YES == sug_p1))
- {
- /* Changing preference for peer 0 */
- stage ++;
- GNUNET_ATS_performance_change_preference (perf_ats, &p[0].id, GNUNET_ATS_PREFERENCE_BANDWIDTH,(double) 1000, GNUNET_ATS_PREFERENCE_END);
- sug_p0 = GNUNET_NO;
- sug_p1 = GNUNET_NO;
- return;
- }
-
+ /* Callback for initial suggestion */
+ if (0 == memcmp (&address->peer, &p[0].id, sizeof (p[0].id)))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Stage %u: Callback for peer 0 `%s': (in/out) %u/%u\n",
+ stage,
+ GNUNET_i2s (&address->peer),
+ (unsigned int) ntohl (bandwidth_in.value__),
+ (unsigned int) ntohl (bandwidth_out.value__));
+ sug_p0 = GNUNET_YES;
+ p0_last_bandwidth_out = ntohl(bandwidth_out.value__);
+ p0_last_bandwidth_in = ntohl(bandwidth_in.value__);
+ }
+ if (0 == memcmp (&address->peer, &p[1].id, sizeof (p[1].id)))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Stage %u: Callback for peer 1 `%s': (in/out) %u/%u\n",
+ stage,
+ GNUNET_i2s (&address->peer),
+ (unsigned int) ntohl (bandwidth_in.value__),
+ (unsigned int) ntohl (bandwidth_out.value__));
+ sug_p1 = GNUNET_YES;
+ p1_last_bandwidth_out = ntohl(bandwidth_out.value__);
+ p1_last_bandwidth_in = ntohl(bandwidth_in.value__);
+ }
+ if ((GNUNET_YES == sug_p0) && (GNUNET_YES == sug_p1))
+ {
+ /* Changing preference for peer 0 */
+ stage ++;
+ GNUNET_ATS_performance_change_preference (perf_ats, &p[0].id, GNUNET_ATS_PREFERENCE_BANDWIDTH,(double) 1000, GNUNET_ATS_PREFERENCE_END);
+ sug_p0 = GNUNET_NO;
+ sug_p1 = GNUNET_NO;
+ return;
+ }
}
if (1 == stage)
{
- /* Callback due to preference change */
- if (0 == memcmp (&address->peer, &p[0].id, sizeof (p[0].id)))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stage %u: Callback for peer 0 `%s': (in/out) %lu/%lu\n",
- stage,
- GNUNET_i2s (&address->peer),
- ntohl (bandwidth_in.value__),
- ntohl (bandwidth_out.value__));
- sug_p0 = GNUNET_YES;
-
- /* Peer 0 should get more bandwidth */
- if (cur_bandwidth_out <= p0_last_bandwidth_out)
- GNUNET_break (0);
- if (cur_bandwidth_in <= p0_last_bandwidth_in)
- GNUNET_break (0);
- p0_last_bandwidth_out = ntohl(bandwidth_out.value__);
- p0_last_bandwidth_in = ntohl(bandwidth_in.value__);
- }
- if (0 == memcmp (&address->peer, &p[1].id, sizeof (p[1].id)))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stage %u: Callback for peer 1 `%s': (in/out) %lu/%lu\n",
- stage,
- GNUNET_i2s (&address->peer),
- ntohl (bandwidth_in.value__),
- ntohl (bandwidth_out.value__));
- sug_p1 = GNUNET_YES;
-
- /* Peer 1 should get less bandwidth */
- if (cur_bandwidth_out >= p1_last_bandwidth_out)
- {
- GNUNET_break (0);
- goto error;
- }
- if (cur_bandwidth_in >= p1_last_bandwidth_in)
- {
- GNUNET_break (0);
- goto error;
- }
- p1_last_bandwidth_out = ntohl(bandwidth_out.value__);
- p1_last_bandwidth_in = ntohl(bandwidth_in.value__);
- }
- if ((GNUNET_YES == sug_p0) && (GNUNET_YES == sug_p1))
- {
- stage ++;
- sug_p0 = GNUNET_NO;
- sug_p1 = GNUNET_NO;
- return;
- }
+ /* Callback due to preference change */
+ if (0 == memcmp (&address->peer, &p[0].id, sizeof (p[0].id)))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Stage %u: Callback for peer 0 `%s': (in/out) %u/%u\n",
+ stage,
+ GNUNET_i2s (&address->peer),
+ (unsigned int) ntohl (bandwidth_in.value__),
+ (unsigned int) ntohl (bandwidth_out.value__));
+ sug_p0 = GNUNET_YES;
+
+ /* Peer 0 should get more bandwidth */
+ if (cur_bandwidth_out <= p0_last_bandwidth_out)
+ GNUNET_break (0);
+ if (cur_bandwidth_in <= p0_last_bandwidth_in)
+ GNUNET_break (0);
+ p0_last_bandwidth_out = ntohl(bandwidth_out.value__);
+ p0_last_bandwidth_in = ntohl(bandwidth_in.value__);
+ }
+ if (0 == memcmp (&address->peer, &p[1].id, sizeof (p[1].id)))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Stage %u: Callback for peer 1 `%s': (in/out) %u/%u\n",
+ stage,
+ GNUNET_i2s (&address->peer),
+ (unsigned int) ntohl (bandwidth_in.value__),
+ (unsigned int) ntohl (bandwidth_out.value__));
+ sug_p1 = GNUNET_YES;
+
+ /* Peer 1 should get less bandwidth */
+ if (cur_bandwidth_out >= p1_last_bandwidth_out)
+ {
+ GNUNET_break (0);
+ goto error;
+ }
+ if (cur_bandwidth_in >= p1_last_bandwidth_in)
+ {
+ GNUNET_break (0);
+ goto error;
+ }
+ p1_last_bandwidth_out = ntohl(bandwidth_out.value__);
+ p1_last_bandwidth_in = ntohl(bandwidth_in.value__);
+ }
+ if ((GNUNET_YES == sug_p0) && (GNUNET_YES == sug_p1))
+ {
+ stage ++;
+ sug_p0 = GNUNET_NO;
+ sug_p1 = GNUNET_NO;
+ return;
+ }
}
if (2 == stage)
{
- /* Callback due to preference aging */
- if (0 == memcmp (&address->peer, &p[0].id, sizeof (p[0].id)))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stage %u: Callback for peer 0 `%s': (in/out) %lu/%lu\n",
- stage,
- GNUNET_i2s (&address->peer),
- ntohl (bandwidth_in.value__),
- ntohl (bandwidth_out.value__));
- sug_p0 = GNUNET_YES;
-
- /* Peer 0 should get less bandwidth */
- if (cur_bandwidth_out <= p0_last_bandwidth_out)
- GNUNET_break (0);
- if (cur_bandwidth_in <= p0_last_bandwidth_in)
- GNUNET_break (0);
- p0_last_bandwidth_out = ntohl(bandwidth_out.value__);
- p0_last_bandwidth_in = ntohl(bandwidth_in.value__);
- }
- if (0 == memcmp (&address->peer, &p[1].id, sizeof (p[1].id)))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stage %u: Callback for peer 1 `%s': (in/out) %lu/%lu\n",
- stage,
- GNUNET_i2s (&address->peer),
- ntohl (bandwidth_in.value__),
- ntohl (bandwidth_out.value__));
- sug_p1 = GNUNET_YES;
- /* Peer 1 should get more bandwidth */
- if (cur_bandwidth_out <= p1_last_bandwidth_out)
- {
- GNUNET_break (0);
- goto error;
- }
- if (cur_bandwidth_in <= p1_last_bandwidth_in)
- {
- GNUNET_break (0);
- goto error;
- }
- p0_last_bandwidth_out = ntohl(bandwidth_out.value__);
- p0_last_bandwidth_in = ntohl(bandwidth_in.value__);
- }
-
- if ((GNUNET_YES == sug_p0) && (GNUNET_YES == sug_p1))
- {
- /* Done ! */
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Done!\n");
- stage ++;
- ret = 0;
- GNUNET_SCHEDULER_add_now (&end,NULL);
- return;
- }
+ /* Callback due to preference aging */
+ if (0 == memcmp (&address->peer, &p[0].id, sizeof (p[0].id)))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Stage %u: Callback for peer 0 `%s': (in/out) %u/%u\n",
+ stage,
+ GNUNET_i2s (&address->peer),
+ (unsigned int) ntohl (bandwidth_in.value__),
+ (unsigned int) ntohl (bandwidth_out.value__));
+ sug_p0 = GNUNET_YES;
+
+ /* Peer 0 should get less bandwidth */
+ if (cur_bandwidth_out <= p0_last_bandwidth_out)
+ GNUNET_break (0);
+ if (cur_bandwidth_in <= p0_last_bandwidth_in)
+ GNUNET_break (0);
+ p0_last_bandwidth_out = ntohl(bandwidth_out.value__);
+ p0_last_bandwidth_in = ntohl(bandwidth_in.value__);
+ }
+ if (0 == memcmp (&address->peer, &p[1].id, sizeof (p[1].id)))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Stage %u: Callback for peer 1 `%s': (in/out) %u/%u\n",
+ stage,
+ GNUNET_i2s (&address->peer),
+ (unsigned int) ntohl (bandwidth_in.value__),
+ (unsigned int) ntohl (bandwidth_out.value__));
+ sug_p1 = GNUNET_YES;
+ /* Peer 1 should get more bandwidth */
+ if (cur_bandwidth_out <= p1_last_bandwidth_out)
+ {
+ GNUNET_break (0);
+ goto error;
+ }
+ if (cur_bandwidth_in <= p1_last_bandwidth_in)
+ {
+ GNUNET_break (0);
+ goto error;
+ }
+ p0_last_bandwidth_out = ntohl(bandwidth_out.value__);
+ p0_last_bandwidth_in = ntohl(bandwidth_in.value__);
+ }
+
+ if ((GNUNET_YES == sug_p0) && (GNUNET_YES == sug_p1))
+ {
+ /* Done ! */
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Done!\n");
+ stage ++;
+ ret = 0;
+ GNUNET_SCHEDULER_add_now (&end,NULL);
+ return;
+ }
}
return;
error:
- /* Error ! */
- ret = 1;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Error!\n");
- GNUNET_SCHEDULER_add_now (&end,NULL);
+ /* Error ! */
+ ret = 1;
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Error!\n");
+ GNUNET_SCHEDULER_add_now (&end,NULL);
}
+
static void
run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg,
time_delta = GNUNET_TIME_absolute_get_difference(time_start, GNUNET_TIME_absolute_get());
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Received suggestion for peer '%s': IN %lu - OUT %lu\n",
- GNUNET_i2s (&address->peer), ntohl(bandwidth_in.value__)/1024, ntohl(bandwidth_out.value__)/1024);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Received suggestion for peer '%s': IN %u kb/s - OUT %u kb/s\n",
+ GNUNET_i2s (&address->peer),
+ (unsigned int) ntohl (bandwidth_in.value__)/1024,
+ (unsigned int) ntohl (bandwidth_out.value__)/1024);
if (write_data_file)
{
GNUNET_DISK_PERM_USER_EXEC | GNUNET_DISK_PERM_USER_READ | GNUNET_DISK_PERM_USER_WRITE);
if (NULL == data_file_handle)
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot write data to file `%s'\n", data_file_name);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Cannot write data to file `%s'\n",
+ data_file_name);
}
else
{
if (GNUNET_SYSERR == GNUNET_DISK_file_write(data_file_handle, data, strlen(data)))
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot write data to file `%s'\n", data_file_name);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Cannot write data to file `%s'\n",
+ data_file_name);
if (GNUNET_SYSERR == GNUNET_DISK_file_close (data_file_handle))
- GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Cannot close log file '%s'\n",
- data_file_name);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Cannot close log file '%s'\n",
+ data_file_name);
}
GNUNET_free(data);
}
-
- return;
}
const char *name, uint64_t value,
int is_persistent)
{
-
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "ATS statistics: `%s' `%s' %llu\n",
- subsystem,name, value);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "ATS statistics: `%s' `%s' %llu\n",
+ subsystem,name,
+ (unsigned long long) value);
GNUNET_ATS_suggest_address (sched_ats, &p.id);
return GNUNET_OK;
}
+
static void
run (void *cls, const struct GNUNET_CONFIGURATION_Handle *mycfg,
struct GNUNET_TESTING_Peer *peer)
/* Expecting disconnect */
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Received sugggestion for peer `%s': %lu %lu\n",
- GNUNET_i2s (&address->peer),
- ntohl(bandwidth_in.value__),
- ntohl(bandwidth_out.value__));
+ "Received sugggestion for peer `%s': %u %u\n",
+ GNUNET_i2s (&address->peer),
+ (unsigned int) ntohl (bandwidth_in.value__),
+ (unsigned int) ntohl (bandwidth_out.value__));
if ((ntohl(bandwidth_in.value__) == 0) &&
(ntohl(bandwidth_out.value__) == 0))
task, task_cls);
}
+
/**
* Schedule a new task to be run with a specified delay or when the
* specified file descriptor is ready. The delay can be