src/identity-provider/identity_token.c
src/identity-provider/plugin_rest_identity_provider.c
src/jsonapi/jsonapi.c
+src/jsonapi/jsonapi_document.c
+src/jsonapi/jsonapi_error.c
+src/jsonapi/jsonapi_relationship.c
+src/jsonapi/jsonapi_resource.c
src/json/json.c
src/json/json_generator.c
src/json/json_helper.c
src/set/ibf_sim.c
src/set/set_api.c
src/social/gnunet-service-social.c
+src/social/gnunet-social.c
src/social/social_api.c
src/statistics/gnunet-service-statistics.c
src/statistics/gnunet-statistics.c
if (GNUNET_YES == l->verbose)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Master[%u] delta: %llu us, bytes (sent/received): %u / %u; throughput send/recv: %u / %u\n", c_m,
- delta.rel_value_us,
- mlt->total_bytes_sent,
- mlt->total_bytes_received,
- mlt->total_throughput_send,
- mlt->total_throughput_recv);
+ "Master[%u] delta: %llu us, bytes (sent/received): %u / %u; throughput send/recv: %u / %u\n",
+ c_m,
+ (unsigned long long) delta.rel_value_us,
+ mlt->total_bytes_sent,
+ mlt->total_bytes_received,
+ mlt->total_throughput_send,
+ mlt->total_throughput_recv);
}
mlt->slaves_log = GNUNET_malloc (bp->peer->num_partners *
if (GNUNET_YES == l->verbose)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Master [%u] -> Slave [%u]: delta: %llu us, bytes (sent/received): %u / %u; throughput send/recv: %u / %u\n",
- c_m, c_s,
- delta.rel_value_us,
- mlt->total_bytes_sent,
- mlt->total_bytes_received,
- slt->throughput_sent,
- slt->throughput_recv);
+ "Master [%u] -> Slave [%u]: delta: %llu us, bytes (sent/received): %u / %u; throughput send/recv: %u / %u\n",
+ c_m, c_s,
+ (unsigned long long) delta.rel_value_us,
+ mlt->total_bytes_sent,
+ mlt->total_bytes_received,
+ slt->throughput_sent,
+ slt->throughput_recv);
}
else
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
*/
struct PreferenceGenerator *
GNUNET_ATS_TEST_generate_preferences_start (struct BenchmarkPeer *src,
- struct BenchmarkPartner *dest,
- enum GeneratorType type,
- long int base_value,
- long int value_rate,
- struct GNUNET_TIME_Relative period,
- struct GNUNET_TIME_Relative frequency,
- enum GNUNET_ATS_PreferenceKind kind)
+ struct BenchmarkPartner *dest,
+ enum GeneratorType type,
+ unsigned int base_value,
+ unsigned int value_rate,
+ struct GNUNET_TIME_Relative period,
+ struct GNUNET_TIME_Relative frequency,
+ enum GNUNET_ATS_PreferenceKind kind)
{
struct PreferenceGenerator *pg;
switch (type) {
case GNUNET_ATS_TEST_TG_CONSTANT:
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Setting up constant preference generator master[%u] `%s' and slave [%u] `%s' max %u Bips\n",
- dest->me->no, GNUNET_i2s (&dest->me->id),
- dest->dest->no, GNUNET_i2s (&dest->dest->id),
- base_value);
+ "Setting up constant preference generator master[%u] `%s' and slave [%u] `%s' max %u Bips\n",
+ dest->me->no, GNUNET_i2s (&dest->me->id),
+ dest->dest->no, GNUNET_i2s (&dest->dest->id),
+ base_value);
break;
case GNUNET_ATS_TEST_TG_LINEAR:
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Setting up linear preference generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bips\n",
- dest->me->no, GNUNET_i2s (&dest->me->id),
- dest->dest->no, GNUNET_i2s (&dest->dest->id),
- base_value, value_rate);
+ "Setting up linear preference generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bips\n",
+ dest->me->no, GNUNET_i2s (&dest->me->id),
+ dest->dest->no, GNUNET_i2s (&dest->dest->id),
+ base_value, value_rate);
break;
case GNUNET_ATS_TEST_TG_SINUS:
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Setting up sinus preference generator master[%u] `%s' and slave [%u] `%s' baserate %u Bips, amplitude %u Bps\n",
- dest->me->no, GNUNET_i2s (&dest->me->id),
- dest->dest->no, GNUNET_i2s (&dest->dest->id),
- base_value, value_rate);
+ "Setting up sinus preference generator master[%u] `%s' and slave [%u] `%s' baserate %u Bips, amplitude %u Bps\n",
+ dest->me->no, GNUNET_i2s (&dest->me->id),
+ dest->dest->no, GNUNET_i2s (&dest->dest->id),
+ base_value, value_rate);
break;
case GNUNET_ATS_TEST_TG_RANDOM:
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Setting up random preference generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bps\n",
- dest->me->no, GNUNET_i2s (&dest->me->id),
- dest->dest->no, GNUNET_i2s (&dest->dest->id),
- base_value, value_rate);
+ "Setting up random preference generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bps\n",
+ dest->me->no, GNUNET_i2s (&dest->me->id),
+ dest->dest->no, GNUNET_i2s (&dest->dest->id),
+ base_value, value_rate);
break;
default:
break;
delay.rel_value_us = GNUNET_TIME_UNIT_SECONDS.rel_value_us * TEST_MESSAGE_SIZE / cur_rate;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Current rate is %u, calculated delay is %u \n",
- cur_rate, delay.rel_value_us);
+ "Current rate is %lld, calculated delay is %llu\n",
+ cur_rate,
+ (unsigned long long) delay.rel_value_us);
return delay;
}
*/
struct TrafficGenerator *
GNUNET_ATS_TEST_generate_traffic_start (struct BenchmarkPeer *src,
- struct BenchmarkPartner *dest,
- enum GeneratorType type,
- long int base_rate,
- long int max_rate,
- struct GNUNET_TIME_Relative period,
- struct GNUNET_TIME_Relative duration)
+ struct BenchmarkPartner *dest,
+ enum GeneratorType type,
+ unsigned int base_rate,
+ unsigned int max_rate,
+ struct GNUNET_TIME_Relative period,
+ struct GNUNET_TIME_Relative duration)
{
struct TrafficGenerator *tg;
switch (type) {
case GNUNET_ATS_TEST_TG_CONSTANT:
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Setting up constant traffic generator master[%u] `%s' and slave [%u] `%s' max %u Bips\n",
- dest->me->no, GNUNET_i2s (&dest->me->id),
- dest->dest->no, GNUNET_i2s (&dest->dest->id),
- base_rate);
+ "Setting up constant traffic generator master[%u] `%s' and slave [%u] `%s' max %u Bips\n",
+ dest->me->no, GNUNET_i2s (&dest->me->id),
+ dest->dest->no, GNUNET_i2s (&dest->dest->id),
+ base_rate);
break;
case GNUNET_ATS_TEST_TG_LINEAR:
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Setting up linear traffic generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bips\n",
- dest->me->no, GNUNET_i2s (&dest->me->id),
- dest->dest->no, GNUNET_i2s (&dest->dest->id),
- base_rate, max_rate);
+ "Setting up linear traffic generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bips\n",
+ dest->me->no, GNUNET_i2s (&dest->me->id),
+ dest->dest->no, GNUNET_i2s (&dest->dest->id),
+ base_rate,
+ max_rate);
break;
case GNUNET_ATS_TEST_TG_SINUS:
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Setting up sinus traffic generator master[%u] `%s' and slave [%u] `%s' baserate %u Bips, amplitude %u Bps\n",
- dest->me->no, GNUNET_i2s (&dest->me->id),
- dest->dest->no, GNUNET_i2s (&dest->dest->id),
- base_rate, max_rate);
+ "Setting up sinus traffic generator master[%u] `%s' and slave [%u] `%s' baserate %u Bips, amplitude %u Bps\n",
+ dest->me->no, GNUNET_i2s (&dest->me->id),
+ dest->dest->no, GNUNET_i2s (&dest->dest->id),
+ base_rate, max_rate);
break;
case GNUNET_ATS_TEST_TG_RANDOM:
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Setting up random traffic generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bps\n",
- dest->me->no, GNUNET_i2s (&dest->me->id),
- dest->dest->no, GNUNET_i2s (&dest->dest->id),
- base_rate, max_rate);
+ "Setting up random traffic generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bps\n",
+ dest->me->no, GNUNET_i2s (&dest->me->id),
+ dest->dest->no, GNUNET_i2s (&dest->dest->id),
+ base_rate, max_rate);
break;
default:
break;
if (me->core_slave_connections == top->num_slaves)
{
- GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Master [%u] connected all slaves\n",
- me->no);
+ GNUNET_log(GNUNET_ERROR_TYPE_INFO,
+ "Master [%u] connected all slaves\n",
+ me->no);
}
completed = GNUNET_YES;
for (c = 0; c < top->num_masters; c++)
}
if (GNUNET_YES == completed)
{
- GNUNET_log(GNUNET_ERROR_TYPE_INFO,
- "All master peers connected all slave peers\n", id,
- GNUNET_i2s (peer));
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "All master peers connected all slave peers\n");
top->state.connected_CORE = GNUNET_YES;
/* Notify about setup done */
if (NULL != top->done_cb)
*/
struct TrafficGenerator *
GNUNET_ATS_TEST_generate_traffic_start (struct BenchmarkPeer *src,
- struct BenchmarkPartner *dest,
- enum GeneratorType type,
- long int base_rate,
- long int max_rate,
- struct GNUNET_TIME_Relative period,
- struct GNUNET_TIME_Relative duration);
+ struct BenchmarkPartner *dest,
+ enum GeneratorType type,
+ unsigned int base_rate,
+ unsigned int max_rate,
+ struct GNUNET_TIME_Relative period,
+ struct GNUNET_TIME_Relative duration);
+
void
GNUNET_ATS_TEST_generate_traffic_stop (struct TrafficGenerator *tg);
*/
struct PreferenceGenerator *
GNUNET_ATS_TEST_generate_preferences_start (struct BenchmarkPeer *src,
- struct BenchmarkPartner *dest,
- enum GeneratorType type,
- long int base_value,
- long int value_rate,
- struct GNUNET_TIME_Relative period,
- struct GNUNET_TIME_Relative frequency,
- enum GNUNET_ATS_PreferenceKind kind);
+ struct BenchmarkPartner *dest,
+ enum GeneratorType type,
+ unsigned int base_value,
+ unsigned int value_rate,
+ struct GNUNET_TIME_Relative period,
+ struct GNUNET_TIME_Relative frequency,
+ enum GNUNET_ATS_PreferenceKind kind);
void
GNUNET_ATS_TEST_generate_preferences_stop (struct PreferenceGenerator *pg);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Solver notifies `%s' with result `%s'\n",
"GAS_OP_SOLVE_STOP",
- (GAS_STAT_SUCCESS == status) ? "SUCCESS" : "FAIL",
- add_info);
+ (GAS_STAT_SUCCESS == status) ? "SUCCESS" : "FAIL");
return;
case GAS_OP_SOLVE_SETUP_START:
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
direction,
GNUNET_ATS_print_network_type (network),
quota_str,
- GNUNET_ATS_DefaultBandwidth);
+ (unsigned long long) GNUNET_ATS_DefaultBandwidth);
ret = GNUNET_ATS_DefaultBandwidth;
}
else
_("No %s-quota configured for network `%s', assigning default bandwidth %llu\n"),
direction,
GNUNET_ATS_print_network_type (type),
- GNUNET_ATS_DefaultBandwidth);
+ (unsigned long long) GNUNET_ATS_DefaultBandwidth);
ret = GNUNET_ATS_DefaultBandwidth;
}
GNUNET_free (entry);
if (msize != esize)
{
GNUNET_break_op (0);
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "m:%u, e: %u\n", msize, esize);
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "m:%u, e: %u\n",
+ (unsigned int) msize,
+ (unsigned int) esize);
h->info_cb.peer_cb (h->info_cls, NULL, 0, 0, 0, NULL);
goto clean_cls;
}
if (msize != esize)
{
GNUNET_break_op (0);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "m:%u, e: %u (%u ch, %u conn)\n",
- msize, esize, ch_n, c_n);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%u (%u ch, %u conn)\n",
- sizeof (struct GNUNET_CADET_LocalInfoTunnel),
- sizeof (CADET_ChannelNumber), sizeof (struct GNUNET_HashCode));
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "m:%u, e: %u (%u ch, %u conn)\n",
+ (unsigned int) msize,
+ (unsigned int) esize,
+ ch_n,
+ c_n);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "%u (%u ch, %u conn)\n",
+ (unsigned int) sizeof (struct GNUNET_CADET_LocalInfoTunnel),
+ (unsigned int) sizeof (CADET_ChannelNumber),
+ (unsigned int) sizeof (struct GNUNET_HashCode));
h->info_cb.tunnel_cb (h->info_cls, NULL, 0, 0, NULL, NULL, 0, 0);
goto clean_cls;
}
uint32_t i;
i = GNUNET_TESTBED_get_index (peer);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " STATS %u - %s [%s]: %llu\n",
- i, subsystem, name, value);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ " STATS %u - %s [%s]: %llu\n",
+ i, subsystem, name,
+ (unsigned long long) value);
return GNUNET_OK;
}
static void
next_rnd (void *cls)
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "ROUND %ld\n", current_round);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "ROUND %u\n",
+ current_round);
if (0.0 == rounds[current_round])
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Finishing\n");
static size_t
tmt_rdy_ping (void *cls, size_t size, void *buf)
{
- struct CadetPeer *peer = (struct CadetPeer *) cls;
+ struct CadetPeer *peer = cls;
struct CadetPingMessage *msg = buf;
peer->ping_ntr = NULL;
GNUNET_break (GNUNET_YES == test_finished);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"size %u, buf %p, data_sent %u, data_received %u\n",
- size, buf, peer->data_sent, peer->data_received);
+ (unsigned int) size,
+ buf,
+ peer->data_sent,
+ peer->data_received);
return 0;
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending: msg %d\n", peer->data_sent);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Sending: msg %d\n",
+ peer->data_sent);
msg->header.size = htons (size);
msg->header.type = htons (PING);
msg->counter = htonl (peer->data_sent++);
{
long n = (long) cls;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%u got PING\n", n);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "%u got PING\n",
+ (unsigned int) n);
GNUNET_CADET_receive_done (channel);
if (GNUNET_NO == test_finished)
pong (channel, (struct CadetPingMessage *) message);
GNUNET_assert (NULL != peer);
if (NULL == peers[n].incoming)
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "WARMUP %3u: %u <= %u\n",
- peers_warmup, n, get_index (peer));
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "WARMUP %3u: %u <= %u\n",
+ peers_warmup,
+ (unsigned int) n,
+ get_index (peer));
peers_warmup++;
if (peers_warmup < peers_total)
return NULL;
}
GNUNET_assert (peer == peers[n].incoming);
GNUNET_assert (peer->dest == &peers[n]);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%u <= %u %p\n",
- n, get_index (peer), channel);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "%u <= %u %p\n",
+ (unsigned int) n,
+ get_index (peer),
+ channel);
peers[n].incoming_ch = channel;
return NULL;
GNUNET_CADET_TEST_cleanup (test_ctx);
return;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%u => %u %p\n",
- i, get_index (peers[i].dest), peers[i].ch);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "%lu => %u %p\n",
+ i,
+ get_index (peers[i].dest),
+ peers[i].ch);
peers[i].ping_task = GNUNET_SCHEDULER_add_delayed (delay_ms_rnd (2000),
&ping, &peers[i]);
}
return;
}
peers[n].id = *(pinfo->result.id);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, " %u id: %s\n",
- n, GNUNET_i2s (&peers[n].id));
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "%ld id: %s\n",
+ n,
+ GNUNET_i2s (&peers[n].id));
GNUNET_break (GNUNET_OK ==
GNUNET_CONTAINER_multipeermap_put (ids, &peers[n].id, &peers[n],
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST));
}
total_size = data_size + sizeof (struct GNUNET_MessageHeader);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "sending %u bytes\n", data_size);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "sending %u bytes\n",
+ (unsigned int) data_size);
GNUNET_assert (size >= total_size);
msg = buf;
static char buf[60000];
data_size = read (0, buf, 60000);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "stdio read %u bytes\n", data_size);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "stdio read %u bytes\n",
+ (unsigned int) data_size);
if (data_size < 1)
{
GNUNET_SCHEDULER_shutdown();
dec = opus_decoder_create (SAMPLING_RATE, channels, &err);
if (OPUS_OK != err)
{
- fprintf (stderr,
- "Cannot create encoder: %s\n",
+ fprintf (stderr,
+ "Cannot create encoder: %s\n",
opus_strerror (err));
return NULL;
}
if (! dec)
{
fprintf (stderr,
- "Decoder initialization failed: %s\n",
+ "Decoder initialization failed: %s\n",
opus_strerror (err));
return NULL;
}
#ifdef DEBUG_DUMP_DECODED_OGG
-static size_t
+static size_t
fwrite_le32(opus_int32 i32, FILE *file)
{
unsigned char buf[4];
}
-static size_t
+static size_t
fwrite_le16(int i16, FILE *file)
{
unsigned char buf[2];
int64_t wrote = 0;
wrote = to_write;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Writing %u * %u * %u = %u bytes into PA\n",
- to_write, channels, sizeof (float),
- to_write * channels * sizeof (float));
+ "Writing %u * %u * %u = %llu bytes into PA\n",
+ to_write,
+ channels,
+ (unsigned int) sizeof (float),
+ (unsigned long long) (to_write * channels * sizeof (float)));
#ifdef DEBUG_DUMP_DECODED_OGG
if (dump_to_stdout)
{
so that we can adjust the timestamp counting.*/
gran_offset = preskip;
- if (!pcm_buffer)
+ if (! pcm_buffer)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Allocating %u * %u * %u = %u bytes of buffer space\n",
- MAX_FRAME_SIZE, channels, sizeof (float),
- MAX_FRAME_SIZE * channels * sizeof (float));
+ "Allocating %u * %u * %u = %llu bytes of buffer space\n",
+ MAX_FRAME_SIZE,
+ channels,
+ (unsigned int) sizeof (float),
+ (unsigned long long) (MAX_FRAME_SIZE * channels * sizeof (float)));
pcm_buffer = pa_xmalloc (sizeof (float) * MAX_FRAME_SIZE * channels);
}
}
frame_size = ret;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Decoded %d bytes/channel (%d bytes) from %u compressed bytes\n",
- ret, ret * channels, op.bytes);
+ ret,
+ ret * channels,
+ (unsigned int) op.bytes);
/*Apply header gain, if we're not using an opus library new
enough to do this internally.*/
const void *data;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Got %u/%u bytes of PCM data\n",
- length,
+ "Got %u/%d bytes of PCM data\n",
+ (unsigned int) length,
pcm_length);
GNUNET_assert (NULL != s);
if (NULL == commentspacket)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("Failed to allocate %d bytes for second packet\n"),
- commentspacket_len);
+ _("Failed to allocate %u bytes for second packet\n"),
+ (unsigned int) commentspacket_len);
exit (5);
}
ch->audio_data = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending %u bytes of audio data from line %u to remote line %u via cadet\n",
- ch->audio_size, ch->line->local_line, ch->remote_line);
+ (unsigned int) ch->audio_size,
+ ch->line->local_line,
+ ch->remote_line);
return sizeof (struct CadetAudioMessage) + ch->audio_size;
}
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received %u bytes of AUDIO data for non-existing line %u, dropping.\n",
- msize, ntohl (msg->remote_line));
+ (unsigned int) msize,
+ ntohl (msg->remote_line));
return GNUNET_SYSERR;
}
if (NULL == ch)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received %u bytes of AUDIO data for unknown sender.\n",
- msize);
+ (unsigned int) msize);
return GNUNET_SYSERR;
}
if ((GNUNET_YES == ch->suspended_local) || (GNUNET_YES == ch->suspended_remote))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received %u bytes of AUDIO data on suspended channel CID %u:(%u:%u); dropping\n",
- msize, ch->cid, ch->remote_line, line->local_line);
+ (unsigned int) msize,
+ ch->cid,
+ ch->remote_line,
+ line->local_line);
GNUNET_CADET_receive_done (channel);
return GNUNET_OK;
}
GNUNET_CADET_receive_done (channel);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Forwarding %u bytes of AUDIO data to client CID %u:(%u:%u)\n",
- msize, ch->cid, ch->remote_line, ch->line->local_line);
+ (unsigned int) msize,
+ ch->cid,
+ ch->remote_line,
+ ch->line->local_line);
cam = (struct ClientAudioMessage *) buf;
cam->header.size = htons (sizeof (buf));
cam->header.type = htons (GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO);
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Ephemeral key message from peer `%s' rejected as its validity range does not match our system time (%llu not in [%llu,%llu]).\n"),
GNUNET_i2s (&kx->peer),
- now.abs_value_us,
- start_t.abs_value_us,
- end_t.abs_value_us);
+ (unsigned long long) now.abs_value_us,
+ (unsigned long long) start_t.abs_value_us,
+ (unsigned long long) end_t.abs_value_us);
return;
}
kx->other_ephemeral_key = m->ephemeral_key;
used - ENCRYPTED_HEADER_SIZE));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Encrypted %u bytes for %s\n",
- used - ENCRYPTED_HEADER_SIZE,
+ (unsigned int) (used - ENCRYPTED_HEADER_SIZE),
GNUNET_i2s (&kx->peer));
derive_auth_key (&auth_key,
&kx->encrypt_key,
return;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Decrypted %u bytes from %s\n",
- size - ENCRYPTED_HEADER_SIZE,
+ (unsigned int) (size - ENCRYPTED_HEADER_SIZE),
GNUNET_i2s (&kx->peer));
pt = (struct EncryptedMessage *) buf;
"Soliciting messages (excess %d, maxpc %d, message size %u, deadline %s)\n",
excess,
maxpc,
- msize,
+ (unsigned int) msize,
GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_remaining (min_deadline),
GNUNET_YES));
solicit_messages (session,
payload += value;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Notification from statistics about existing payload (%llu), new payload is %llu\n",
- value, payload);
+ (unsigned long long) value,
+ (unsigned long long) payload);
return GNUNET_OK;
}
reply);
memcpy (&cbuf[off], reply->msg, msize);
GNUNET_free (reply);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmitting %u bytes to client %p\n",
- msize, client->client_handle);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Transmitting %u bytes to client %p\n",
+ (unsigned int) msize,
+ client->client_handle);
off += msize;
}
process_pending_messages (client);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmitted %u/%u bytes to client %p\n",
- (unsigned int) off, (unsigned int) size, client->client_handle);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Transmitted %u/%u bytes to client %p\n",
+ (unsigned int) off,
+ (unsigned int) size,
+ client->client_handle);
return off;
}
reply);
memcpy (&cbuf[off], reply->msg, msize);
GNUNET_free (reply);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmitting %u bytes to client %p\n",
- msize, client->client_handle);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Transmitting %u bytes to client %p\n",
+ (unsigned int) msize,
+ client->client_handle);
off += msize;
}
process_pending_messages (client);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmitted %u/%u bytes to client %p\n",
- (unsigned int) off, (unsigned int) size, client->client_handle);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Transmitted %u/%u bytes to client %p\n",
+ (unsigned int) off,
+ (unsigned int) size,
+ client->client_handle);
return off;
}
reply);
memcpy (&cbuf[off], reply->msg, msize);
GNUNET_free (reply);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmitting %u bytes to client %p\n",
- msize, client->client_handle);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Transmitting %u bytes to client %p\n",
+ (unsigned int) msize,
+ client->client_handle);
off += msize;
}
process_pending_messages (client);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmitted %u/%u bytes to client %p\n",
- (unsigned int) off, (unsigned int) size, client->client_handle);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Transmitted %u/%u bytes to client %p\n",
+ (unsigned int) off,
+ (unsigned int) size,
+ client->client_handle);
return off;
}
trail_id = trail->trail_id;
if (NULL == GDS_ROUTING_get_next_hop(trail_id,GDS_ROUTING_SRC_TO_DEST))
{
- DEBUG(" NO ENTRY FOUND IN %s ROUTING TABLE for trail id %s, line",
- GNUNET_i2s(&my_identity), GNUNET_h2s(&trail->trail_id), __LINE__);
+ DEBUG(" NO ENTRY FOUND IN %s ROUTING TABLE for trail id %s, line %u",
+ GNUNET_i2s (&my_identity),
+ GNUNET_h2s (&trail->trail_id),
+ __LINE__);
GNUNET_break(0);
return;
}
{
/* Here it may happen that source peer has found a new successor, and removed
the trail, Hence no entry found in the routing table. Fail silently.*/
- DEBUG(" NO ENTRY FOUND IN %s ROUTING TABLE for trail id %s, line",
- GNUNET_i2s(&my_identity), GNUNET_h2s(&trail_id), __LINE__);
+ DEBUG (" NO ENTRY FOUND IN %s ROUTING TABLE for trail id %s, line %u",
+ GNUNET_i2s (&my_identity),
+ GNUNET_h2s (&trail_id),
+ __LINE__);
GNUNET_break_op(0);
return GNUNET_OK;
}
next_hop = GDS_ROUTING_get_next_hop (trail_id, trail_direction);
if (NULL == next_hop)
{
- DEBUG(" NO ENTRY FOUND IN %s ROUTING TABLE for trail id %s, line",
- GNUNET_i2s(&my_identity), GNUNET_h2s(&trail_id), __LINE__);
+ DEBUG(" NO ENTRY FOUND IN %s ROUTING TABLE for trail id %s, line %u",
+ GNUNET_i2s (&my_identity),
+ GNUNET_h2s(&trail_id),
+ __LINE__);
GNUNET_break (0);
return GNUNET_SYSERR;
}
struct GNUNET_TESTBED_Operation *op,
const char *emsg)
{
- INFO ("# Outgoing bandwidth: %u\n", outgoing_bandwidth);
- INFO ("# Incoming bandwidth: %u\n", incoming_bandwidth);
+ INFO ("# Outgoing bandwidth: %llu\n",
+ (unsigned long long) outgoing_bandwidth);
+ INFO ("# Incoming bandwidth: %llu\n",
+ (unsigned long long) incoming_bandwidth);
GNUNET_SCHEDULER_shutdown ();
}
* @param subsystem name of subsystem that created the statistic
* @param name the name of the datum
* @param value the current value
- * @param is_persistent GNUNET_YES if the value is persistent, GNUNET_NO if not
- * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration
+ * @param is_persistent #GNUNET_YES if the value is persistent, #GNUNET_NO if not
+ * @return #GNUNET_OK to continue, #GNUNET_SYSERR to abort iteration
*/
static int
bandwidth_stats_iterator (void *cls,
total_put_path_length = total_put_path_length + (double)put_path_length;
total_get_path_length = total_get_path_length + (double)get_path_length;
- DEBUG ("total_put_path_length = %f,put_path \n",total_put_path_length);
+ DEBUG ("total_put_path_length = %u,put_path \n",
+ total_put_path_length);
/* Summarize if profiling is complete */
if (n_active == n_gets_fail + n_gets_ok)
{
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("Received DNS response that is too small (%u bytes)"),
- r);
+ (unsigned int) r);
return GNUNET_NO;
}
dns = (struct GNUNET_TUN_DnsHeader *) buf;
char dbuf[INET6_ADDRSTRLEN];
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received TCP packet with %u bytes going from %s:%u to %s:%u\n",
- pktlen - sizeof (struct GNUNET_TUN_TcpHeader),
+ (unsigned int) (pktlen - sizeof (struct GNUNET_TUN_TcpHeader)),
inet_ntop (af,
source_ip,
sbuf, sizeof (sbuf)),
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Starting download %p, %u bytes at offset %llu\n",
dc,
- (unsigned long long) length,
+ (unsigned int) length,
(unsigned long long) offset);
dc->h = h;
dc->uri = GNUNET_FS_uri_dup (uri);
if (NULL == wh)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("Failed to open `%s' for writing: %s\n"), STRERROR (errno));
+ _("Failed to open `%s' for writing: %s\n"),
+ fn,
+ STRERROR (errno));
GNUNET_free (fn);
return;
}
}
END:
if (GNUNET_OK != GNUNET_BIO_write_close (wh))
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Failed to write `%s': %s\n"),
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ _("Failed to write `%s': %s\n"),
+ fn,
STRERROR (errno));
GNUNET_free (fn);
}
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Indexing block `%s' for offset %llu with index size %u\n",
- GNUNET_h2s (&chk->query), (unsigned long long) offset,
- sizeof (struct OnDemandBlock));
+ GNUNET_h2s (&chk->query),
+ (unsigned long long) offset,
+ (unsigned int) sizeof (struct OnDemandBlock));
odb.offset = GNUNET_htonll (offset);
odb.file_id = p->data.file.file_id;
GNUNET_assert (pc->qre == NULL);
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Queued reply to query `%s' for local client\n",
- GNUNET_h2s (&prd->query), (unsigned int) prd->type);
+ GNUNET_h2s (&prd->query));
if (GNUNET_BLOCK_EVALUATION_OK_LAST != eval)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Asking for transmission of %u bytes to %s for migration\n",
- msize,
+ (unsigned int) msize,
GNUNET_i2s (GSF_connected_peer_get_identity2_(peer->peer)));
peer->th = GSF_peer_transmit_ (peer->peer,
GNUNET_NO, 0 /* priority */ ,
if ((0 == port) || (port > UINT16_MAX))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("Invalid port number %llu. Exiting.\n"),
+ _("Invalid port number %u. Exiting.\n"),
port);
return GNUNET_SYSERR;
}
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- _("Businesscard HTTP server starts on %llu\n"),
+ _("Businesscard HTTP server starts on %u\n"),
port);
daemon_handle = MHD_start_daemon (MHD_USE_DUAL_STACK | MHD_USE_DEBUG,
(uint16_t) port,
(unsigned int) transmission_size);
hostlist_adv_count++;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- " # Sent advertisement message: %u\n",
- hostlist_adv_count);
+ " # Sent advertisement message: %llu\n",
+ (unsigned long long) hostlist_adv_count);
GNUNET_STATISTICS_update (stats,
gettext_noop ("# hostlist advertisements send"), 1,
GNUNET_NO);
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Asked CORE to transmit advertisement message with a size of %u bytes to peer `%s'\n",
- size,
+ (unsigned int) size,
GNUNET_i2s (peer));
if (NULL ==
(th = GNUNET_CORE_notify_transmit_ready (core, GNUNET_YES,
* a failure of the command 'cmd' with the message given
* by strerror(errno).
*/
-#define GNUNET_log_strerror_file(level, cmd, filename) do { GNUNET_log(level, _("`%s' failed on file `%s' at %s:%d with error: %s\n"), cmd, filename,__FILE__, __LINE__, STRERROR(errno)); } while(0)
+#define GNUNET_log_strerror_file(level, cmd, filename) do { GNUNET_log(level, _("`%s' failed on file `%s' at %s:%d with error: %s\n"), cmd, filename, __FILE__, __LINE__, STRERROR(errno)); } while(0)
/**
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"STUN service listens on port %u\n",
- port);
+ (unsigned int) port);
if (GNUNET_NO ==
GNUNET_NAT_stun_make_request (stun_server, stun_port,
lsock4,
return 0;
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "In round s, sending to `%s' estimate with %u bits\n",
+ "In round %s, sending to `%s' estimate with %u bits\n",
GNUNET_STRINGS_absolute_time_to_string (GNUNET_TIME_absolute_ntoh (size_estimate_messages[idx].timestamp)),
GNUNET_i2s (&peer_entry->id),
(unsigned int) ntohl (size_estimate_messages[idx].matching_bits));
delay =
get_transmit_delay ((peer_entry->previous_round == GNUNET_NO) ? -1 : 0);
peer_entry->transmit_task =
- GNUNET_SCHEDULER_add_delayed (delay,
+ GNUNET_SCHEDULER_add_delayed (delay,
&transmit_task_cb,
peer_entry);
return GNUNET_OK;
if (req_size < sizeof (struct StoreRecordMessage))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Received message with invalid size: (%d < %d).\n", req_size,
- sizeof (struct StoreRecordMessage));
+ "Received message with invalid size: (%d < %d).\n",
+ (int) req_size,
+ (int) sizeof (struct StoreRecordMessage));
return NULL;
}
srm = (struct StoreRecordMessage *) message;
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Received message with invalid sizes: (%d + %d + %d + %d != %d).\n",
- ss_size, key_size, value_size,
- sizeof (struct StoreRecordMessage), req_size);
+ ss_size,
+ key_size,
+ value_size,
+ (int) sizeof (struct StoreRecordMessage),
+ req_size);
return NULL;
}
record = GNUNET_new (struct GNUNET_PEERSTORE_Record);
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"%u + %u + %u != %u\n",
- sizeof (*req), relay_size, join_msg_size, req_size);
+ (unsigned int) sizeof (*req),
+ relay_size,
+ join_msg_size,
+ req_size);
GNUNET_break (0);
GNUNET_SERVER_client_disconnect (client);
GNUNET_free (slv);
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"%p Message payload too large: %u < %u.\n",
- chn, GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD, size - sizeof (*msg));
+ chn,
+ GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD,
+ (unsigned int) (size - sizeof (*msg)));
GNUNET_break (0);
transmit_cancel (chn, client);
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
* Received result of GNUNET_PSYCSTORE_membership_store()
*/
static void
-store_recv_membership_store_result (void *cls, int64_t result,
- const char *err_msg, uint16_t err_msg_size)
+store_recv_membership_store_result (void *cls,
+ int64_t result,
+ const char *err_msg,
+ uint16_t err_msg_size)
{
struct Operation *op = cls;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"%p GNUNET_PSYCSTORE_membership_store() returned %" PRId64 " (%.s)\n",
- op->chn, result, err_msg_size, err_msg);
+ op->chn,
+ result,
+ (int) err_msg_size,
+ err_msg);
if (NULL != op->client)
client_send_result (op->client, op->op_id, result, err_msg, err_msg_size);
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"%p History replay #%" PRIu64 ": "
"invalid method prefix. size: %u < %u?\n",
- chn, GNUNET_ntohll (req->op_id), size, sizeof (*req) + 1);
+ chn,
+ GNUNET_ntohll (req->op_id),
+ size,
+ (unsigned int) sizeof (*req) + 1);
GNUNET_break (0);
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
return;
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Message get: invalid method prefix. size: %u < %u?\n",
- size, sizeof (*req) + 1);
+ size,
+ (unsigned int) (sizeof (*req) + 1));
GNUNET_break (0);
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
return;
{
struct GNUNET_PSYC_MessageMethod *meth
= (struct GNUNET_PSYC_MessageMethod *) msg;
- GNUNET_log (kind, "\t%.*s\n", size - sizeof (*meth), &meth[1]);
+ GNUNET_log (kind,
+ "\t%.*s\n",
+ (int) (size - sizeof (*meth)),
+ &meth[1]);
break;
}
case GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MODIFIER:
= (struct GNUNET_PSYC_MessageModifier *) msg;
uint16_t name_size = ntohs (mod->name_size);
char oper = ' ' < mod->oper ? mod->oper : ' ';
- GNUNET_log (kind, "\t%c%.*s\t%.*s\n", oper, name_size, &mod[1],
- size - sizeof (*mod) - name_size,
+ GNUNET_log (kind,
+ "\t%c%.*s\t%.*s\n",
+ oper,
+ (int) name_size,
+ &mod[1],
+ (int) (size - sizeof (*mod) - name_size),
((char *) &mod[1]) + name_size);
break;
}
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"%p -> %s [%s]: %llu\n",
- peer, subsystem, name, value);
+ peer,
+ subsystem,
+ name,
+ (unsigned long long) value);
return GNUNET_OK;
}
size =
peer,
subsystem, value, name);
if (size != GNUNET_DISK_file_write (data_file, output_buffer, size))
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Unable to write to file!\n");
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Unable to write to file!\n");
return GNUNET_OK;
}
* @param len Lenght of token.
* @param key Hash of next state.
*
- * @return GNUNET_YES, to keep iterating
+ * @return #GNUNET_YES, to keep iterating
*/
static int
check_edge (void *cls,
struct CheckEdgeContext *ctx = cls;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "edge %.*s [%u]: %s->%s\n",
- (int) len, token, len, GNUNET_h2s(key));
+ "edge %.*s [%u]: %sn",
+ (int) len,
+ token,
+ (unsigned int) len,
+ GNUNET_h2s (key));
if (NULL == ctx->xquery)
return GNUNET_YES;
if (strlen (ctx->xquery) < len)
struct CheckEdgeContext ctx;
int res;
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Block check\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Block check\n");
if (GNUNET_OK !=
REGEX_BLOCK_get_key (block, size,
&key))
( (NULL == xquery) || ('\0' == xquery[0]) ) )
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
- " out! Is accepting: %u, xquery %p\n",
- ntohs(block->is_accepting), xquery);
+ " out! Is accepting: %u, xquery %p\n",
+ ntohs(block->is_accepting),
+ xquery);
return GNUNET_OK;
}
ctx.xquery = xquery;
}
-/**
- * Task run whenever HTTP server is idle for too long. Kill it.
- *
- * @param cls NULL
- */
-static void
-kill_httpd_task (void *cls)
-{
- httpd_task = NULL;
- kill_httpd ();
-}
-
-
/**
* Schedule MHD. This function should be called initially when an
* MHD is first getting its client socket, and will then automatically
if (NULL == client)
return;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Client disconnected from us.\n",
- client);
+ "Client disconnected from us.\n");
s = GNUNET_SERVER_client_get_user_context (client,
struct BobServiceSession);
if (NULL == s)
if (NULL == client)
return;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Client disconnected from us.\n",
- client);
+ "Client disconnected from us.\n");
s = GNUNET_SERVER_client_get_user_context (client,
struct BobServiceSession);
if (NULL == s)
if (element->size != sizeof (struct GNUNET_HashCode))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "wrong element size: %u, expected %u\n", element->size, sizeof (struct GNUNET_HashCode));
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "wrong element size: %u, expected %u\n",
+ element->size,
+ (unsigned int) sizeof (struct GNUNET_HashCode));
GNUNET_assert (0);
}
}
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("Loading %llu bytes of statistics from `%s'\n"),
- fsize, fn);
+ (unsigned long long) fsize, fn);
mst = GNUNET_SERVER_mst_create (&inject_message,
server);
GNUNET_break (GNUNET_OK ==
e->subsystem->service,
e->name,
e->persistent,
- e->value);
+ (unsigned long long) e->value);
GNUNET_SERVER_notification_context_unicast (nc, client, &m->header,
GNUNET_NO);
GNUNET_free (m);
"Statistic `%s:%s' updated to value %llu (%d).\n",
service,
name,
- pos->value,
+ (unsigned long long) pos->value,
pos->persistent);
if ( (changed) ||
(1 == initial_set) )
"New statistic on `%s:%s' with value %llu created.\n",
service,
name,
- pos->value);
+ (unsigned long long) pos->value);
GNUNET_SERVER_receive_done (client,
GNUNET_OK);
}
"New statistic on `%s:%s' with value %llu created.\n",
service,
name,
- pos->value);
+ (unsigned long long) pos->value);
}
we = GNUNET_new (struct WatchEntry);
we->client = client;
GNUNET_SCHEDULER_shutdown ();
return;
}
- LOG_DEBUG ("Read %u bytes\n", sread);
+ LOG_DEBUG ("Read %u bytes\n",
+ (unsigned int) sread);
if (GNUNET_OK !=
GNUNET_SERVER_mst_receive (tokenizer, NULL, buf, sread, GNUNET_NO,
GNUNET_NO))
/**
- * Message handler for GNUNET_MESSAGE_TYPE_TESTBED_DESTROYPEER messages
+ * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_DESTROYPEER messages
*
* @param cls NULL
* @param client identification of the client
* @param message the actual message
*/
void
-GST_handle_peer_destroy (void *cls, struct GNUNET_SERVER_Client *client,
+GST_handle_peer_destroy (void *cls,
+ struct GNUNET_SERVER_Client *client,
const struct GNUNET_MessageHeader *message)
{
const struct GNUNET_TESTBED_PeerDestroyMessage *msg;
msg = (const struct GNUNET_TESTBED_PeerDestroyMessage *) message;
peer_id = ntohl (msg->peer_id);
- LOG_DEBUG ("Received peer destory on peer: %u and operation id: %ul\n",
- peer_id, GNUNET_ntohll (msg->operation_id));
+ LOG_DEBUG ("Received peer destory on peer: %u and operation id: %llu\n",
+ (unsigned int) peer_id,
+ (unsigned long long) GNUNET_ntohll (msg->operation_id));
if (!VALID_PEER_ID (peer_id))
{
LOG (GNUNET_ERROR_TYPE_ERROR,
* Stats a peer
*
* @param peer the peer to start
- * @return GNUNET_OK upon success; GNUNET_SYSERR upon failure
+ * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
*/
static int
start_peer (struct Peer *peer)
* Stops a peer
*
* @param peer the peer to stop
- * @return GNUNET_OK upon success; GNUNET_SYSERR upon failure
+ * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
*/
static int
stop_peer (struct Peer *peer)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Discarded %u bytes type %u payload from peer `%s'\n",
- msg_size,
+ (unsigned int) msg_size,
ntohs (message->type),
GNUNET_i2s (&address->peer));
GNUNET_STATISTICS_update (GST_stats, gettext_noop
{
max_fd_rlimit = r_file.rlim_cur;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Maximum number of open files was: %u/%u\n",
- r_file.rlim_cur,
- r_file.rlim_max);
+ "Maximum number of open files was: %u/%u\n",
+ (unsigned int) r_file.rlim_cur,
+ (unsigned int) r_file.rlim_max);
}
max_fd_rlimit = (9 * max_fd_rlimit) / 10; /* Keep 10% for rest of transport */
#endif
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Delaying %u byte message to peer `%s' with peer specific delay for %s\n",
- msg_size,
+ (unsigned int) msg_size,
GNUNET_i2s (target),
GNUNET_STRINGS_relative_time_to_string (delay,
GNUNET_YES));
if (bytes_in_send_queue < mq->message_buf_size)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Bytes_in_send_queue `%u', Message_size %u, result: %s, payload %u, on wire %u\n",
+ "Bytes_in_send_queue `%llu', Message_size %u, result: %s, payload %u, on wire %u\n",
bytes_in_send_queue,
- mq->message_buf_size,
+ (unsigned int) mq->message_buf_size,
(GNUNET_OK == success) ? "OK" : "FAIL",
- size_payload,
- physical);
+ (unsigned int) size_payload,
+ (unsigned int) physical);
GNUNET_break (0);
}
"Sending message to `%s' of type %u with %u bytes was a %s\n",
GNUNET_i2s (receiver),
ntohs (((struct GNUNET_MessageHeader *) mq->message_buf)->type),
- mq->message_buf_size,
+ (unsigned int) mq->message_buf_size,
(success == GNUNET_OK) ? "success" : "FAILURE");
if (NULL != mq->cont)
mq->cont (mq->cont_cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Giving message with %u bytes to plugin session %p\n",
- mq->message_buf_size,
+ (unsigned int) mq->message_buf_size,
n->primary_address.session);
(void) send_with_session (n,
mq->message_buf,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Enqueueing %u bytes to send to peer %s\n",
- msg_size,
+ (unsigned int) msg_size,
GNUNET_i2s (target));
GNUNET_CONTAINER_DLL_insert_tail (n->messages_head,
n->messages_tail,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"New inbound delay for peer `%s' is %llu ms\n",
GNUNET_i2s (&n->id),
- delay.rel_value_us / 1000);
+ (unsigned long long) delay.rel_value_us / 1000LL);
papi->update_inbound_delay (papi->cls,
&n->id,
n->primary_address.session,
/* The session used to send the SYN terminated:
* this implies a connect error*/
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Failed to send SYN in %s with `%s' %p: session terminated\n",
- "CONNECT_SENT",
+ "Failed to send SYN in CONNECT_SENT with `%s' %p: session terminated\n",
GST_plugins_a2s (n->primary_address.address),
- n->primary_address.session,
- GNUNET_i2s (peer));
+ n->primary_address.session);
/* Destroy the address since it cannot be used */
unset_primary_address (n);
break;
case GNUNET_TRANSPORT_PS_RECONNECT_SENT:
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Failed to send SYN in %s with `%s' %p: session terminated\n",
- "RECONNECT_SENT",
+ "Failed to send SYN in RECONNECT_SENT with `%s' %p: session terminated\n",
GST_plugins_a2s (n->primary_address.address),
- n->primary_address.session,
- GNUNET_i2s (peer));
+ n->primary_address.session);
/* Destroy the address since it cannot be used */
unset_primary_address (n);
set_state_and_timeout (n,
client,
GNUNET_i2s (&address->peer),
address->transport_name,
- address->address_length);
+ (unsigned int) address->address_length);
msg = GNUNET_malloc (len);
msg->header.size = htons (len);
/**
* Write our current proof to disk.
- *
+ *
* @param cls closure
*/
static void
GNUNET_DISK_PERM_USER_WRITE))
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING,
"write",
- proof);
+ pwfn);
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Got Proof of Work %llu\n",
- proof);
+ (unsigned long long) proof);
proof_task = NULL;
memcpy (&buf[sizeof (uint64_t)], &pub,
sizeof (struct GNUNET_CRYPTO_EddsaPublicKey));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Delay between tries: %s\n",
GNUNET_STRINGS_relative_time_to_string (proof_find_delay, 1));
- proof_task =
+ proof_task =
GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_IDLE,
&find_proof,
NULL);
GNUNET_assert (size >= tnq->len);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending %u bytes via cadet channel\n",
- tnq->len);
+ (unsigned int) tnq->len);
GNUNET_CONTAINER_DLL_remove (ts->tmq_head,
ts->tmq_tail,
tnq);
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Queueing %u bytes for transmission via cadet channel\n",
- tnq->len);
+ (unsigned int) tnq->len);
GNUNET_assert (NULL != ts->channel);
GNUNET_CONTAINER_DLL_insert_tail (ts->tmq_head,
ts->tmq_tail,