aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
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,
769 char *stat_txt; 769 char *stat_txt;
770 770
771 LOG (GNUNET_ERROR_TYPE_DEBUG, 771 LOG (GNUNET_ERROR_TYPE_DEBUG,
772 "Session %p/request %p: Sending message with %u to peer `%s' \n", 772 "Session %p/request %p: Sending message with %lu to peer `%s' \n",
773 s, 773 s,
774 s->put.easyhandle, 774 s->put.easyhandle,
775 msgbuf_size, 775 (unsigned long) msgbuf_size,
776 GNUNET_i2s (&s->address->peer)); 776 GNUNET_i2s (&s->address->peer));
777 777
778 /* create new message and schedule */ 778 /* create new message and schedule */
@@ -1087,11 +1087,10 @@ client_send_cb (void *stream,
1087 if (msg->pos == msg->size) 1087 if (msg->pos == msg->size)
1088 { 1088 {
1089 LOG (GNUNET_ERROR_TYPE_DEBUG, 1089 LOG (GNUNET_ERROR_TYPE_DEBUG,
1090 "Session %p/request %p: sent message with %u bytes sent, removing message from queue\n", 1090 "Session %p/request %p: sent message with %lu bytes sent, removing message from queue\n",
1091 s, 1091 s,
1092 s->put.easyhandle, 1092 s->put.easyhandle,
1093 msg->size, 1093 (unsigned long) msg->size);
1094 msg->pos);
1095 /* Calling transmit continuation */ 1094 /* Calling transmit continuation */
1096 GNUNET_CONTAINER_DLL_remove (s->msg_head, 1095 GNUNET_CONTAINER_DLL_remove (s->msg_head,
1097 s->msg_tail, 1096 s->msg_tail,
@@ -1249,10 +1248,10 @@ client_receive (void *stream,
1249 size_t len = size * nmemb; 1248 size_t len = size * nmemb;
1250 1249
1251 LOG (GNUNET_ERROR_TYPE_DEBUG, 1250 LOG (GNUNET_ERROR_TYPE_DEBUG,
1252 "Session %p / request %p: Received %u bytes from peer `%s'\n", 1251 "Session %p / request %p: Received %lu bytes from peer `%s'\n",
1253 s, 1252 s,
1254 s->get.easyhandle, 1253 s->get.easyhandle,
1255 len, 1254 (unsigned long) len,
1256 GNUNET_i2s (&s->address->peer)); 1255 GNUNET_i2s (&s->address->peer));
1257 now = GNUNET_TIME_absolute_get (); 1256 now = GNUNET_TIME_absolute_get ();
1258 if (now.abs_value_us < s->next_receive.abs_value_us) 1257 if (now.abs_value_us < s->next_receive.abs_value_us)
@@ -1346,7 +1345,7 @@ client_run (void *cls)
1346 /* Log status of terminated request */ 1345 /* Log status of terminated request */
1347 if ((0 != msg->data.result) || (http_statuscode != 200)) 1346 if ((0 != msg->data.result) || (http_statuscode != 200))
1348 LOG (GNUNET_ERROR_TYPE_DEBUG, 1347 LOG (GNUNET_ERROR_TYPE_DEBUG,
1349 "Session %p/request %p: %s request to `%s' ended with status %i reason %i: `%s'\n", 1348 "Session %p/request %p: %s request to `%s' ended with status %li reason %i: `%s'\n",
1350 s, msg->easy_handle, 1349 s, msg->easy_handle,
1351 (GNUNET_YES == put_request) ? "PUT" : "GET", 1350 (GNUNET_YES == put_request) ? "PUT" : "GET",
1352 GNUNET_i2s (&s->address->peer), 1351 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,
629 if (addr_str[ntohl (address->urlen) - 1] != '\0') 629 if (addr_str[ntohl (address->urlen) - 1] != '\0')
630 return NULL; 630 return NULL;
631 GNUNET_asprintf (&res, "%s.%u.%s", plugin, ntohl (address->options), 631 GNUNET_asprintf (&res, "%s.%u.%s", plugin, ntohl (address->options),
632 &address[1]); 632 (char*)&address[1]);
633 if (strlen (res) + 1 < 500) 633 if (strlen (res) + 1 < 500)
634 { 634 {
635 GNUNET_memcpy (rbuf, res, strlen (res) + 1); 635 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,
745 char *stat_txt; 745 char *stat_txt;
746 746
747 LOG (GNUNET_ERROR_TYPE_DEBUG, 747 LOG (GNUNET_ERROR_TYPE_DEBUG,
748 "Session %p/request %p: Sending message with %u to peer `%s'\n", 748 "Session %p/request %p: Sending message with %lu to peer `%s'\n",
749 session, 749 session,
750 session->server_send, 750 session->server_send,
751 msgbuf_size, 751 (unsigned long) msgbuf_size,
752 GNUNET_i2s (&session->target)); 752 GNUNET_i2s (&session->target));
753 753
754 /* create new message and schedule */ 754 /* create new message and schedule */
@@ -1270,8 +1270,8 @@ server_parse_url (struct HTTP_Server_Plugin *plugin,
1270 if (hash_length != plugin->peer_id_length) 1270 if (hash_length != plugin->peer_id_length)
1271 { 1271 {
1272 LOG (GNUNET_ERROR_TYPE_DEBUG, 1272 LOG (GNUNET_ERROR_TYPE_DEBUG,
1273 "URL target is %u bytes, expecting %u\n", 1273 "URL target is %lu bytes, expecting %u\n",
1274 hash_length, plugin->peer_id_length); 1274 (unsigned long) hash_length, plugin->peer_id_length);
1275 return GNUNET_SYSERR; 1275 return GNUNET_SYSERR;
1276 } 1276 }
1277 if (GNUNET_OK != 1277 if (GNUNET_OK !=
@@ -1616,8 +1616,8 @@ server_send_callback (void *cls,
1616 { 1616 {
1617 sc->connected = GNUNET_YES; 1617 sc->connected = GNUNET_YES;
1618 LOG (GNUNET_ERROR_TYPE_DEBUG, 1618 LOG (GNUNET_ERROR_TYPE_DEBUG,
1619 "Sent %u bytes to peer `%s' with session %p \n", 1619 "Sent %lu bytes to peer `%s' with session %p \n",
1620 bytes_read, 1620 (unsigned long) bytes_read,
1621 GNUNET_i2s (&s->target), 1621 GNUNET_i2s (&s->target),
1622 s); 1622 s);
1623 GNUNET_asprintf (&stat_txt, 1623 GNUNET_asprintf (&stat_txt,
@@ -1761,14 +1761,14 @@ server_access_cb (void *cls,
1761 1761
1762 LOG (GNUNET_ERROR_TYPE_DEBUG, 1762 LOG (GNUNET_ERROR_TYPE_DEBUG,
1763 _ ( 1763 _ (
1764 "Access from connection %p (%u of %u) for `%s' `%s' url `%s' with upload data size %u\n"), 1764 "Access from connection %p (%u of %u) for `%s' `%s' url `%s' with upload data size %lu\n"),
1765 sc, 1765 sc,
1766 plugin->cur_request, 1766 plugin->cur_request,
1767 plugin->max_request, 1767 plugin->max_request,
1768 method, 1768 method,
1769 version, 1769 version,
1770 url, 1770 url,
1771 (*upload_data_size)); 1771 (unsigned long) (*upload_data_size));
1772 if (NULL == sc) 1772 if (NULL == sc)
1773 { 1773 {
1774 /* CORS pre-flight request */ 1774 /* CORS pre-flight request */
@@ -1868,19 +1868,19 @@ server_access_cb (void *cls,
1868 1868
1869 /* (*upload_data_size > 0) for every segment received */ 1869 /* (*upload_data_size > 0) for every segment received */
1870 LOG (GNUNET_ERROR_TYPE_DEBUG, 1870 LOG (GNUNET_ERROR_TYPE_DEBUG,
1871 "Session %p / Connection %p: Peer `%s' PUT on address `%s' received %u bytes\n", 1871 "Session %p / Connection %p: Peer `%s' PUT on address `%s' received %lu bytes\n",
1872 s, sc, 1872 s, sc,
1873 GNUNET_i2s (&s->target), 1873 GNUNET_i2s (&s->target),
1874 http_common_plugin_address_to_string (plugin->protocol, 1874 http_common_plugin_address_to_string (plugin->protocol,
1875 s->address->address, 1875 s->address->address,
1876 s->address->address_length), 1876 s->address->address_length),
1877 *upload_data_size); 1877 (unsigned long) *upload_data_size);
1878 delay = GNUNET_TIME_absolute_get_remaining (s->next_receive); 1878 delay = GNUNET_TIME_absolute_get_remaining (s->next_receive);
1879 if (0 == delay.rel_value_us) 1879 if (0 == delay.rel_value_us)
1880 { 1880 {
1881 LOG (GNUNET_ERROR_TYPE_DEBUG, 1881 LOG (GNUNET_ERROR_TYPE_DEBUG,
1882 "PUT with %u bytes forwarded to MST\n", 1882 "PUT with %lu bytes forwarded to MST\n",
1883 *upload_data_size); 1883 (unsigned long) *upload_data_size);
1884 if (s->msg_tk == NULL) 1884 if (s->msg_tk == NULL)
1885 { 1885 {
1886 s->msg_tk = GNUNET_MST_create (&server_receive_mst_cb, 1886 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)
2010 GNUNET_assert (pos->message_size <= session->bytes_in_queue); 2010 GNUNET_assert (pos->message_size <= session->bytes_in_queue);
2011 session->bytes_in_queue -= pos->message_size; 2011 session->bytes_in_queue -= pos->message_size;
2012 LOG (GNUNET_ERROR_TYPE_DEBUG, 2012 LOG (GNUNET_ERROR_TYPE_DEBUG,
2013 "Failed to transmit %u byte message to `%s'.\n", 2013 "Failed to transmit %lu byte message to `%s'.\n",
2014 pos->message_size, 2014 (unsigned long) pos->message_size,
2015 GNUNET_i2s (&session->target)); 2015 GNUNET_i2s (&session->target));
2016 ret += pos->message_size; 2016 ret += pos->message_size;
2017 GNUNET_CONTAINER_DLL_insert_after (hd, tl, tl, pos); 2017 GNUNET_CONTAINER_DLL_insert_after (hd, tl, tl, pos);
@@ -2067,9 +2067,9 @@ do_transmit (void *cls, size_t size, void *buf)
2067 session->bytes_in_queue -= pos->message_size; 2067 session->bytes_in_queue -= pos->message_size;
2068 GNUNET_assert (size >= pos->message_size); 2068 GNUNET_assert (size >= pos->message_size);
2069 LOG (GNUNET_ERROR_TYPE_DEBUG, 2069 LOG (GNUNET_ERROR_TYPE_DEBUG,
2070 "Transmitting message of type %u size %u to peer %s at %s\n", 2070 "Transmitting message of type %u size %lu to peer %s at %s\n",
2071 ntohs (((struct GNUNET_MessageHeader *) pos->msg)->type), 2071 ntohs (((struct GNUNET_MessageHeader *) pos->msg)->type),
2072 pos->message_size, 2072 (unsigned long) pos->message_size,
2073 GNUNET_i2s (&session->target), 2073 GNUNET_i2s (&session->target),
2074 tcp_plugin_address_to_string (session->plugin, 2074 tcp_plugin_address_to_string (session->plugin,
2075 session->address->address, 2075 session->address->address,
@@ -2192,8 +2192,8 @@ tcp_plugin_send (void *cls,
2192 pm->transmit_cont_cls = cont_cls; 2192 pm->transmit_cont_cls = cont_cls;
2193 2193
2194 LOG (GNUNET_ERROR_TYPE_DEBUG, 2194 LOG (GNUNET_ERROR_TYPE_DEBUG,
2195 "Asked to transmit %u bytes to `%s', added message to list.\n", 2195 "Asked to transmit %lu bytes to `%s', added message to list.\n",
2196 msgbuf_size, 2196 (unsigned long) msgbuf_size,
2197 GNUNET_i2s (&session->target)); 2197 GNUNET_i2s (&session->target));
2198 2198
2199 if (GNUNET_YES == 2199 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)
1821 struct GNUNET_ATS_Session *session = frag_ctx->session; 1821 struct GNUNET_ATS_Session *session = frag_ctx->session;
1822 size_t msg_len = ntohs (msg->size); 1822 size_t msg_len = ntohs (msg->size);
1823 1823
1824 LOG (GNUNET_ERROR_TYPE_DEBUG, "Enqueuing fragment with %u bytes\n", msg_len); 1824 LOG (GNUNET_ERROR_TYPE_DEBUG, "Enqueuing fragment with %lu bytes\n",
1825 (unsigned long) msg_len);
1825 udpw = GNUNET_malloc (sizeof(struct UDP_MessageWrapper) + msg_len); 1826 udpw = GNUNET_malloc (sizeof(struct UDP_MessageWrapper) + msg_len);
1826 udpw->session = session; 1827 udpw->session = session;
1827 udpw->msg_buf = (char *) &udpw[1]; 1828 udpw->msg_buf = (char *) &udpw[1];
@@ -1996,8 +1997,8 @@ udp_plugin_send (void *cls,
1996 return GNUNET_SYSERR; 1997 return GNUNET_SYSERR;
1997 } 1998 }
1998 LOG (GNUNET_ERROR_TYPE_DEBUG, 1999 LOG (GNUNET_ERROR_TYPE_DEBUG,
1999 "UDP transmits %u-byte message to `%s' using address `%s'\n", 2000 "UDP transmits %lu-byte message to `%s' using address `%s'\n",
2000 udpmlen, 2001 (unsigned long) udpmlen,
2001 GNUNET_i2s (&s->target), 2002 GNUNET_i2s (&s->target),
2002 udp_address_to_string (plugin, 2003 udp_address_to_string (plugin,
2003 s->address->address, 2004 s->address->address,
@@ -3113,18 +3114,18 @@ remove_timeout_messages_and_select (struct Plugin *plugin,
3113 { 3114 {
3114 /* this message is not delayed */ 3115 /* this message is not delayed */
3115 LOG (GNUNET_ERROR_TYPE_DEBUG, 3116 LOG (GNUNET_ERROR_TYPE_DEBUG,
3116 "Message for peer `%s' (%u bytes) is not delayed \n", 3117 "Message for peer `%s' (%lu bytes) is not delayed \n",
3117 GNUNET_i2s (&udpw->session->target), 3118 GNUNET_i2s (&udpw->session->target),
3118 udpw->payload_size); 3119 (unsigned long) udpw->payload_size);
3119 break; /* Found message to send, break */ 3120 break; /* Found message to send, break */
3120 } 3121 }
3121 else 3122 else
3122 { 3123 {
3123 /* Message is delayed, try next */ 3124 /* Message is delayed, try next */
3124 LOG (GNUNET_ERROR_TYPE_DEBUG, 3125 LOG (GNUNET_ERROR_TYPE_DEBUG,
3125 "Message for peer `%s' (%u bytes) is delayed for %s\n", 3126 "Message for peer `%s' (%lu bytes) is delayed for %s\n",
3126 GNUNET_i2s (&udpw->session->target), 3127 GNUNET_i2s (&udpw->session->target),
3127 udpw->payload_size, 3128 (unsigned long) udpw->payload_size,
3128 GNUNET_STRINGS_relative_time_to_string (remaining, GNUNET_YES)); 3129 GNUNET_STRINGS_relative_time_to_string (remaining, GNUNET_YES));
3129 udpw = udpw->next; 3130 udpw = udpw->next;
3130 } 3131 }
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,
1304 return GNUNET_SYSERR; 1304 return GNUNET_SYSERR;
1305 } 1305 }
1306 LOG (GNUNET_ERROR_TYPE_DEBUG, 1306 LOG (GNUNET_ERROR_TYPE_DEBUG,
1307 "Sending %u bytes with session for peer `%s' `%s'\n", 1307 "Sending %lu bytes with session for peer `%s' `%s'\n",
1308 msgbuf_size, 1308 (unsigned long) msgbuf_size,
1309 GNUNET_i2s (&session->target), 1309 GNUNET_i2s (&session->target),
1310 unix_plugin_address_to_string (NULL, 1310 unix_plugin_address_to_string (NULL,
1311 session->address->address, 1311 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:
1142 return; 1142 return;
1143 } 1143 }
1144 LOG (GNUNET_ERROR_TYPE_DEBUG, 1144 LOG (GNUNET_ERROR_TYPE_DEBUG,
1145 "receive_ready read %u/%u bytes from `%s' (%p)!\n", 1145 "receive_ready read %lu/%lu bytes from `%s' (%p)!\n",
1146 (unsigned int) ret, 1146 (unsigned long) ret,
1147 connection->max, 1147 (unsigned long) connection->max,
1148 GNUNET_a2s (connection->addr, connection->addrlen), 1148 GNUNET_a2s (connection->addr, connection->addrlen),
1149 connection); 1149 connection);
1150 GNUNET_assert (NULL != (receiver = connection->receiver)); 1150 GNUNET_assert (NULL != (receiver = connection->receiver));
@@ -1327,8 +1327,8 @@ connect_error (void *cls)
1327 GNUNET_CONNECTION_TransmitReadyNotify notify; 1327 GNUNET_CONNECTION_TransmitReadyNotify notify;
1328 1328
1329 LOG (GNUNET_ERROR_TYPE_DEBUG, 1329 LOG (GNUNET_ERROR_TYPE_DEBUG,
1330 "Transmission request of size %u fails (%s/%u), connection failed (%p).\n", 1330 "Transmission request of size %lu fails (%s/%u), connection failed (%p).\n",
1331 connection->nth.notify_size, 1331 (unsigned long) connection->nth.notify_size,
1332 connection->hostname, 1332 connection->hostname,
1333 connection->port, 1333 connection->port,
1334 connection); 1334 connection);
@@ -1423,9 +1423,9 @@ RETRY:
1423 return; 1423 return;
1424 } 1424 }
1425 LOG (GNUNET_ERROR_TYPE_DEBUG, 1425 LOG (GNUNET_ERROR_TYPE_DEBUG,
1426 "Connection transmitted %u/%u bytes to `%s' (%p)\n", 1426 "Connection transmitted %lu/%lu bytes to `%s' (%p)\n",
1427 (unsigned int) ret, 1427 (unsigned long) ret,
1428 have, 1428 (unsigned long) have,
1429 GNUNET_a2s (connection->addr, connection->addrlen), 1429 GNUNET_a2s (connection->addr, connection->addrlen),
1430 connection); 1430 connection);
1431 connection->write_buffer_pos += ret; 1431 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,
1433 { 1433 {
1434 clock_offset = skew_offset - skew_variance; 1434 clock_offset = skew_offset - skew_variance;
1435 GNUNET_TIME_set_offset (clock_offset); 1435 GNUNET_TIME_set_offset (clock_offset);
1436 LOG (GNUNET_ERROR_TYPE_DEBUG, "Skewing clock by %dll ms\n", clock_offset); 1436 LOG (GNUNET_ERROR_TYPE_DEBUG, "Skewing clock by %lld ms\n", clock_offset);
1437 } 1437 }
1438 /* actually run service */ 1438 /* actually run service */
1439 err = 0; 1439 err = 0;