summaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2020-10-16 17:31:21 +0200
committert3sserakt <t3ss@posteo.de>2020-10-16 17:40:12 +0200
commitcde9403a6cc6bc03e571c872cdee205bbd838c31 (patch)
tree431929de91b2da817816370f9caf98b646d2745e /src/transport
parent4b69b0866d7f29efeb92176e518ddbb6a9052033 (diff)
parente8b0bc481b8a30c325faf55a964cac2cd151f999 (diff)
Merge branch 'master' of ssh://gnunet.org/gnunet
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/plugin_transport_http_client.c15
-rw-r--r--src/transport/plugin_transport_http_common.c2
-rw-r--r--src/transport/plugin_transport_http_server.c24
-rw-r--r--src/transport/plugin_transport_tcp.c12
-rw-r--r--src/transport/plugin_transport_udp.c15
-rw-r--r--src/transport/plugin_transport_unix.c4
-rw-r--r--src/transport/tcp_connection_legacy.c16
-rw-r--r--src/transport/tcp_service_legacy.c2
8 files changed, 45 insertions, 45 deletions
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c
index 92ed2fe52..219fae57b 100644
--- a/src/transport/plugin_transport_http_client.c
+++ b/src/transport/plugin_transport_http_client.c
@@ -769,10 +769,10 @@ http_client_plugin_send (void *cls,
char *stat_txt;
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Session %p/request %p: Sending message with %u to peer `%s' \n",
+ "Session %p/request %p: Sending message with %lu to peer `%s' \n",
s,
s->put.easyhandle,
- msgbuf_size,
+ (unsigned long) msgbuf_size,
GNUNET_i2s (&s->address->peer));
/* create new message and schedule */
@@ -1087,11 +1087,10 @@ client_send_cb (void *stream,
if (msg->pos == msg->size)
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Session %p/request %p: sent message with %u bytes sent, removing message from queue\n",
+ "Session %p/request %p: sent message with %lu bytes sent, removing message from queue\n",
s,
s->put.easyhandle,
- msg->size,
- msg->pos);
+ (unsigned long) msg->size);
/* Calling transmit continuation */
GNUNET_CONTAINER_DLL_remove (s->msg_head,
s->msg_tail,
@@ -1249,10 +1248,10 @@ client_receive (void *stream,
size_t len = size * nmemb;
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Session %p / request %p: Received %u bytes from peer `%s'\n",
+ "Session %p / request %p: Received %lu bytes from peer `%s'\n",
s,
s->get.easyhandle,
- len,
+ (unsigned long) len,
GNUNET_i2s (&s->address->peer));
now = GNUNET_TIME_absolute_get ();
if (now.abs_value_us < s->next_receive.abs_value_us)
@@ -1346,7 +1345,7 @@ client_run (void *cls)
/* Log status of terminated request */
if ((0 != msg->data.result) || (http_statuscode != 200))
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Session %p/request %p: %s request to `%s' ended with status %i reason %i: `%s'\n",
+ "Session %p/request %p: %s request to `%s' ended with status %li reason %i: `%s'\n",
s, msg->easy_handle,
(GNUNET_YES == put_request) ? "PUT" : "GET",
GNUNET_i2s (&s->address->peer),
diff --git a/src/transport/plugin_transport_http_common.c b/src/transport/plugin_transport_http_common.c
index d81d6db9c..0e3778837 100644
--- a/src/transport/plugin_transport_http_common.c
+++ b/src/transport/plugin_transport_http_common.c
@@ -629,7 +629,7 @@ http_common_plugin_address_to_string (const char *plugin,
if (addr_str[ntohl (address->urlen) - 1] != '\0')
return NULL;
GNUNET_asprintf (&res, "%s.%u.%s", plugin, ntohl (address->options),
- &address[1]);
+ (char*)&address[1]);
if (strlen (res) + 1 < 500)
{
GNUNET_memcpy (rbuf, res, strlen (res) + 1);
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index d1b21ba9c..6e95ca00c 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -745,10 +745,10 @@ http_server_plugin_send (void *cls,
char *stat_txt;
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Session %p/request %p: Sending message with %u to peer `%s'\n",
+ "Session %p/request %p: Sending message with %lu to peer `%s'\n",
session,
session->server_send,
- msgbuf_size,
+ (unsigned long) msgbuf_size,
GNUNET_i2s (&session->target));
/* create new message and schedule */
@@ -1270,8 +1270,8 @@ server_parse_url (struct HTTP_Server_Plugin *plugin,
if (hash_length != plugin->peer_id_length)
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "URL target is %u bytes, expecting %u\n",
- hash_length, plugin->peer_id_length);
+ "URL target is %lu bytes, expecting %u\n",
+ (unsigned long) hash_length, plugin->peer_id_length);
return GNUNET_SYSERR;
}
if (GNUNET_OK !=
@@ -1616,8 +1616,8 @@ server_send_callback (void *cls,
{
sc->connected = GNUNET_YES;
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Sent %u bytes to peer `%s' with session %p \n",
- bytes_read,
+ "Sent %lu bytes to peer `%s' with session %p \n",
+ (unsigned long) bytes_read,
GNUNET_i2s (&s->target),
s);
GNUNET_asprintf (&stat_txt,
@@ -1761,14 +1761,14 @@ server_access_cb (void *cls,
LOG (GNUNET_ERROR_TYPE_DEBUG,
_ (
- "Access from connection %p (%u of %u) for `%s' `%s' url `%s' with upload data size %u\n"),
+ "Access from connection %p (%u of %u) for `%s' `%s' url `%s' with upload data size %lu\n"),
sc,
plugin->cur_request,
plugin->max_request,
method,
version,
url,
- (*upload_data_size));
+ (unsigned long) (*upload_data_size));
if (NULL == sc)
{
/* CORS pre-flight request */
@@ -1868,19 +1868,19 @@ server_access_cb (void *cls,
/* (*upload_data_size > 0) for every segment received */
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Session %p / Connection %p: Peer `%s' PUT on address `%s' received %u bytes\n",
+ "Session %p / Connection %p: Peer `%s' PUT on address `%s' received %lu bytes\n",
s, sc,
GNUNET_i2s (&s->target),
http_common_plugin_address_to_string (plugin->protocol,
s->address->address,
s->address->address_length),
- *upload_data_size);
+ (unsigned long) *upload_data_size);
delay = GNUNET_TIME_absolute_get_remaining (s->next_receive);
if (0 == delay.rel_value_us)
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "PUT with %u bytes forwarded to MST\n",
- *upload_data_size);
+ "PUT with %lu bytes forwarded to MST\n",
+ (unsigned long) *upload_data_size);
if (s->msg_tk == NULL)
{
s->msg_tk = GNUNET_MST_create (&server_receive_mst_cb,
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index e3bc21543..8378a64dd 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -2010,8 +2010,8 @@ do_transmit (void *cls, size_t size, void *buf)
GNUNET_assert (pos->message_size <= session->bytes_in_queue);
session->bytes_in_queue -= pos->message_size;
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Failed to transmit %u byte message to `%s'.\n",
- pos->message_size,
+ "Failed to transmit %lu byte message to `%s'.\n",
+ (unsigned long) pos->message_size,
GNUNET_i2s (&session->target));
ret += pos->message_size;
GNUNET_CONTAINER_DLL_insert_after (hd, tl, tl, pos);
@@ -2067,9 +2067,9 @@ do_transmit (void *cls, size_t size, void *buf)
session->bytes_in_queue -= pos->message_size;
GNUNET_assert (size >= pos->message_size);
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Transmitting message of type %u size %u to peer %s at %s\n",
+ "Transmitting message of type %u size %lu to peer %s at %s\n",
ntohs (((struct GNUNET_MessageHeader *) pos->msg)->type),
- pos->message_size,
+ (unsigned long) pos->message_size,
GNUNET_i2s (&session->target),
tcp_plugin_address_to_string (session->plugin,
session->address->address,
@@ -2192,8 +2192,8 @@ tcp_plugin_send (void *cls,
pm->transmit_cont_cls = cont_cls;
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Asked to transmit %u bytes to `%s', added message to list.\n",
- msgbuf_size,
+ "Asked to transmit %lu bytes to `%s', added message to list.\n",
+ (unsigned long) msgbuf_size,
GNUNET_i2s (&session->target));
if (GNUNET_YES ==
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index ec3a0edd8..49e84dfe7 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -1821,7 +1821,8 @@ enqueue_fragment (void *cls, const struct GNUNET_MessageHeader *msg)
struct GNUNET_ATS_Session *session = frag_ctx->session;
size_t msg_len = ntohs (msg->size);
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Enqueuing fragment with %u bytes\n", msg_len);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Enqueuing fragment with %lu bytes\n",
+ (unsigned long) msg_len);
udpw = GNUNET_malloc (sizeof(struct UDP_MessageWrapper) + msg_len);
udpw->session = session;
udpw->msg_buf = (char *) &udpw[1];
@@ -1996,8 +1997,8 @@ udp_plugin_send (void *cls,
return GNUNET_SYSERR;
}
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "UDP transmits %u-byte message to `%s' using address `%s'\n",
- udpmlen,
+ "UDP transmits %lu-byte message to `%s' using address `%s'\n",
+ (unsigned long) udpmlen,
GNUNET_i2s (&s->target),
udp_address_to_string (plugin,
s->address->address,
@@ -3113,18 +3114,18 @@ remove_timeout_messages_and_select (struct Plugin *plugin,
{
/* this message is not delayed */
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Message for peer `%s' (%u bytes) is not delayed \n",
+ "Message for peer `%s' (%lu bytes) is not delayed \n",
GNUNET_i2s (&udpw->session->target),
- udpw->payload_size);
+ (unsigned long) udpw->payload_size);
break; /* Found message to send, break */
}
else
{
/* Message is delayed, try next */
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Message for peer `%s' (%u bytes) is delayed for %s\n",
+ "Message for peer `%s' (%lu bytes) is delayed for %s\n",
GNUNET_i2s (&udpw->session->target),
- udpw->payload_size,
+ (unsigned long) udpw->payload_size,
GNUNET_STRINGS_relative_time_to_string (remaining, GNUNET_YES));
udpw = udpw->next;
}
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index 9d3e7d354..2324914c9 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -1304,8 +1304,8 @@ unix_plugin_send (void *cls,
return GNUNET_SYSERR;
}
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Sending %u bytes with session for peer `%s' `%s'\n",
- msgbuf_size,
+ "Sending %lu bytes with session for peer `%s' `%s'\n",
+ (unsigned long) msgbuf_size,
GNUNET_i2s (&session->target),
unix_plugin_address_to_string (NULL,
session->address->address,
diff --git a/src/transport/tcp_connection_legacy.c b/src/transport/tcp_connection_legacy.c
index 3e173b8a4..924362ef2 100644
--- a/src/transport/tcp_connection_legacy.c
+++ b/src/transport/tcp_connection_legacy.c
@@ -1142,9 +1142,9 @@ RETRY:
return;
}
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "receive_ready read %u/%u bytes from `%s' (%p)!\n",
- (unsigned int) ret,
- connection->max,
+ "receive_ready read %lu/%lu bytes from `%s' (%p)!\n",
+ (unsigned long) ret,
+ (unsigned long) connection->max,
GNUNET_a2s (connection->addr, connection->addrlen),
connection);
GNUNET_assert (NULL != (receiver = connection->receiver));
@@ -1327,8 +1327,8 @@ connect_error (void *cls)
GNUNET_CONNECTION_TransmitReadyNotify notify;
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Transmission request of size %u fails (%s/%u), connection failed (%p).\n",
- connection->nth.notify_size,
+ "Transmission request of size %lu fails (%s/%u), connection failed (%p).\n",
+ (unsigned long) connection->nth.notify_size,
connection->hostname,
connection->port,
connection);
@@ -1423,9 +1423,9 @@ RETRY:
return;
}
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Connection transmitted %u/%u bytes to `%s' (%p)\n",
- (unsigned int) ret,
- have,
+ "Connection transmitted %lu/%lu bytes to `%s' (%p)\n",
+ (unsigned long) ret,
+ (unsigned long) have,
GNUNET_a2s (connection->addr, connection->addrlen),
connection);
connection->write_buffer_pos += ret;
diff --git a/src/transport/tcp_service_legacy.c b/src/transport/tcp_service_legacy.c
index 12dce3993..8606b353b 100644
--- a/src/transport/tcp_service_legacy.c
+++ b/src/transport/tcp_service_legacy.c
@@ -1433,7 +1433,7 @@ LEGACY_SERVICE_run (int argc,
{
clock_offset = skew_offset - skew_variance;
GNUNET_TIME_set_offset (clock_offset);
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Skewing clock by %dll ms\n", clock_offset);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Skewing clock by %lld ms\n", clock_offset);
}
/* actually run service */
err = 0;