aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r--src/transport/plugin_transport_tcp.c102
1 files changed, 51 insertions, 51 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index 0e49300b0..113cb70c5 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -454,7 +454,7 @@ tcp_address_to_string (void *cls, const void *addr, size_t addrlen);
454static unsigned int sessions; 454static unsigned int sessions;
455 455
456 456
457static void 457static void
458inc_sessions (struct Plugin *plugin, struct Session *session, int line) 458inc_sessions (struct Plugin *plugin, struct Session *session, int line)
459{ 459{
460 sessions++; 460 sessions++;
@@ -471,7 +471,7 @@ inc_sessions (struct Plugin *plugin, struct Session *session, int line)
471} 471}
472 472
473 473
474static void 474static void
475dec_sessions (struct Plugin *plugin, struct Session *session, int line) 475dec_sessions (struct Plugin *plugin, struct Session *session, int line)
476{ 476{
477 GNUNET_assert (sessions > 0); 477 GNUNET_assert (sessions > 0);
@@ -607,7 +607,7 @@ tcp_address_to_string (void *cls, const void *addr, size_t addrlen)
607 memcpy (&a6, &t6->ipv6_addr, sizeof (a6)); 607 memcpy (&a6, &t6->ipv6_addr, sizeof (a6));
608 sb = &a6; 608 sb = &a6;
609 break; 609 break;
610 case sizeof (struct IPv4TcpAddress): 610 case sizeof (struct IPv4TcpAddress):
611 t4 = addr; 611 t4 = addr;
612 af = AF_INET; 612 af = AF_INET;
613 port = ntohs (t4->t4_port); 613 port = ntohs (t4->t4_port);
@@ -724,7 +724,7 @@ tcp_string_to_address (void *cls, const char *addr, uint16_t addrlen,
724 *added = sizeof (struct IPv4TcpAddress); 724 *added = sizeof (struct IPv4TcpAddress);
725 return GNUNET_OK; 725 return GNUNET_OK;
726 } 726 }
727 case AF_INET6: 727 case AF_INET6:
728 { 728 {
729 struct IPv6TcpAddress *t6; 729 struct IPv6TcpAddress *t6;
730 struct sockaddr_in6 *in6 = (struct sockaddr_in6 *) &socket_address; 730 struct sockaddr_in6 *in6 = (struct sockaddr_in6 *) &socket_address;
@@ -749,7 +749,7 @@ struct SessionClientCtx
749}; 749};
750 750
751 751
752static int 752static int
753session_lookup_by_client_it (void *cls, 753session_lookup_by_client_it (void *cls,
754 const struct GNUNET_PeerIdentity *key, 754 const struct GNUNET_PeerIdentity *key,
755 void *value) 755 void *value)
@@ -810,7 +810,7 @@ create_session (struct Plugin *plugin, const struct GNUNET_PeerIdentity *target,
810 else 810 else
811 GNUNET_assert (NULL == client); 811 GNUNET_assert (NULL == client);
812 812
813 LOG (GNUNET_ERROR_TYPE_DEBUG, 813 LOG (GNUNET_ERROR_TYPE_DEBUG,
814 "Creating new session for peer `%4s'\n", 814 "Creating new session for peer `%4s'\n",
815 GNUNET_i2s (target)); 815 GNUNET_i2s (target));
816 session = GNUNET_malloc (sizeof (struct Session)); 816 session = GNUNET_malloc (sizeof (struct Session));
@@ -886,7 +886,7 @@ do_transmit (void *cls, size_t size, void *buf)
886 plugin = session->plugin; 886 plugin = session->plugin;
887 if (NULL == buf) 887 if (NULL == buf)
888 { 888 {
889 LOG (GNUNET_ERROR_TYPE_DEBUG, 889 LOG (GNUNET_ERROR_TYPE_DEBUG,
890 "Timeout trying to transmit to peer `%4s', discarding message queue.\n", 890 "Timeout trying to transmit to peer `%4s', discarding message queue.\n",
891 GNUNET_i2s (&session->target)); 891 GNUNET_i2s (&session->target));
892 /* timeout; cancel all messages that have already expired */ 892 /* timeout; cancel all messages that have already expired */
@@ -940,7 +940,7 @@ do_transmit (void *cls, size_t size, void *buf)
940 GNUNET_CONTAINER_DLL_remove (session->pending_messages_head, 940 GNUNET_CONTAINER_DLL_remove (session->pending_messages_head,
941 session->pending_messages_tail, pos); 941 session->pending_messages_tail, pos);
942 GNUNET_assert (size >= pos->message_size); 942 GNUNET_assert (size >= pos->message_size);
943 LOG (GNUNET_ERROR_TYPE_DEBUG, 943 LOG (GNUNET_ERROR_TYPE_DEBUG,
944 "Transmitting message of type %u\n", 944 "Transmitting message of type %u\n",
945 ntohs (((struct GNUNET_MessageHeader *) pos->msg)->type)); 945 ntohs (((struct GNUNET_MessageHeader *) pos->msg)->type));
946 /* FIXME: this memcpy can be up to 7% of our total runtime */ 946 /* FIXME: this memcpy can be up to 7% of our total runtime */
@@ -1017,7 +1017,7 @@ disconnect_session (struct Session *session)
1017 struct PendingMessage *pm; 1017 struct PendingMessage *pm;
1018 struct Plugin * plugin = session->plugin; 1018 struct Plugin * plugin = session->plugin;
1019 1019
1020 LOG (GNUNET_ERROR_TYPE_DEBUG, 1020 LOG (GNUNET_ERROR_TYPE_DEBUG,
1021 "Disconnecting session of peer `%s' address `%s'\n", 1021 "Disconnecting session of peer `%s' address `%s'\n",
1022 GNUNET_i2s (&session->target), 1022 GNUNET_i2s (&session->target),
1023 tcp_address_to_string (NULL, session->addr, session->addrlen)); 1023 tcp_address_to_string (NULL, session->addr, session->addrlen));
@@ -1050,7 +1050,7 @@ disconnect_session (struct Session *session)
1050 1050
1051 while (NULL != (pm = session->pending_messages_head)) 1051 while (NULL != (pm = session->pending_messages_head))
1052 { 1052 {
1053 LOG (GNUNET_ERROR_TYPE_DEBUG, 1053 LOG (GNUNET_ERROR_TYPE_DEBUG,
1054 pm->transmit_cont != 1054 pm->transmit_cont !=
1055 NULL ? "Could not deliver message to `%4s'.\n" : 1055 NULL ? "Could not deliver message to `%4s'.\n" :
1056 "Could not deliver message to `%4s', notifying.\n", 1056 "Could not deliver message to `%4s', notifying.\n",
@@ -1094,7 +1094,7 @@ struct FindSessionContext
1094}; 1094};
1095 1095
1096 1096
1097static int 1097static int
1098session_it (void *cls, 1098session_it (void *cls,
1099 const struct GNUNET_PeerIdentity * key, 1099 const struct GNUNET_PeerIdentity * key,
1100 void *value) 1100 void *value)
@@ -1190,12 +1190,12 @@ tcp_plugin_send (void *cls,
1190 pm->transmit_cont = cont; 1190 pm->transmit_cont = cont;
1191 pm->transmit_cont_cls = cont_cls; 1191 pm->transmit_cont_cls = cont_cls;
1192 1192
1193 LOG (GNUNET_ERROR_TYPE_DEBUG, 1193 LOG (GNUNET_ERROR_TYPE_DEBUG,
1194 "Asked to transmit %u bytes to `%s', added message to list.\n", 1194 "Asked to transmit %u bytes to `%s', added message to list.\n",
1195 msgbuf_size, GNUNET_i2s (&session->target)); 1195 msgbuf_size, GNUNET_i2s (&session->target));
1196 1196
1197 if (GNUNET_YES == GNUNET_CONTAINER_multipeermap_contains_value (plugin->sessionmap, 1197 if (GNUNET_YES == GNUNET_CONTAINER_multipeermap_contains_value (plugin->sessionmap,
1198 &session->target, 1198 &session->target,
1199 session)) 1199 session))
1200 { 1200 {
1201 GNUNET_assert (session->client != NULL); 1201 GNUNET_assert (session->client != NULL);
@@ -1215,7 +1215,7 @@ tcp_plugin_send (void *cls,
1215 } 1215 }
1216 else if (GNUNET_YES == GNUNET_CONTAINER_multipeermap_contains_value(plugin->nat_wait_conns, &session->target, session)) 1216 else if (GNUNET_YES == GNUNET_CONTAINER_multipeermap_contains_value(plugin->nat_wait_conns, &session->target, session))
1217 { 1217 {
1218 LOG (GNUNET_ERROR_TYPE_DEBUG, 1218 LOG (GNUNET_ERROR_TYPE_DEBUG,
1219 "This NAT WAIT session for peer `%s' is not yet ready!\n", 1219 "This NAT WAIT session for peer `%s' is not yet ready!\n",
1220 GNUNET_i2s (&session->target)); 1220 GNUNET_i2s (&session->target));
1221 reschedule_session_timeout (session); 1221 reschedule_session_timeout (session);
@@ -1249,7 +1249,7 @@ struct SessionItCtx
1249}; 1249};
1250 1250
1251 1251
1252static int 1252static int
1253session_lookup_it (void *cls, 1253session_lookup_it (void *cls,
1254 const struct GNUNET_PeerIdentity *key, 1254 const struct GNUNET_PeerIdentity *key,
1255 void *value) 1255 void *value)
@@ -1340,14 +1340,14 @@ tcp_plugin_get_session (void *cls,
1340 GNUNET_assert (plugin != NULL); 1340 GNUNET_assert (plugin != NULL);
1341 GNUNET_assert (address != NULL); 1341 GNUNET_assert (address != NULL);
1342 addrlen = address->address_length; 1342 addrlen = address->address_length;
1343 LOG (GNUNET_ERROR_TYPE_DEBUG, 1343 LOG (GNUNET_ERROR_TYPE_DEBUG,
1344 "Trying to get session for `%s' address of peer `%s'\n", 1344 "Trying to get session for `%s' address of peer `%s'\n",
1345 tcp_address_to_string(NULL, address->address, address->address_length), 1345 tcp_address_to_string(NULL, address->address, address->address_length),
1346 GNUNET_i2s (&address->peer)); 1346 GNUNET_i2s (&address->peer));
1347 1347
1348 /* look for existing session */ 1348 /* look for existing session */
1349 if (GNUNET_YES == 1349 if (GNUNET_YES ==
1350 GNUNET_CONTAINER_multipeermap_contains (plugin->sessionmap, 1350 GNUNET_CONTAINER_multipeermap_contains (plugin->sessionmap,
1351 &address->peer)) 1351 &address->peer))
1352 { 1352 {
1353 struct SessionItCtx si_ctx; 1353 struct SessionItCtx si_ctx;
@@ -1357,8 +1357,8 @@ tcp_plugin_get_session (void *cls,
1357 1357
1358 si_ctx.result = NULL; 1358 si_ctx.result = NULL;
1359 1359
1360 GNUNET_CONTAINER_multipeermap_get_multiple (plugin->sessionmap, 1360 GNUNET_CONTAINER_multipeermap_get_multiple (plugin->sessionmap,
1361 &address->peer, 1361 &address->peer,
1362 &session_lookup_it, &si_ctx); 1362 &session_lookup_it, &si_ctx);
1363 if (si_ctx.result != NULL) 1363 if (si_ctx.result != NULL)
1364 { 1364 {
@@ -1447,7 +1447,7 @@ tcp_plugin_get_session (void *cls,
1447 GNUNET_CONTAINER_multipeermap_contains (plugin->nat_wait_conns, 1447 GNUNET_CONTAINER_multipeermap_contains (plugin->nat_wait_conns,
1448 &address->peer))) 1448 &address->peer)))
1449 { 1449 {
1450 LOG (GNUNET_ERROR_TYPE_DEBUG, 1450 LOG (GNUNET_ERROR_TYPE_DEBUG,
1451 "Found valid IPv4 NAT address (creating session)!\n") ; 1451 "Found valid IPv4 NAT address (creating session)!\n") ;
1452 session = create_session (plugin, &address->peer, NULL, GNUNET_YES); 1452 session = create_session (plugin, &address->peer, NULL, GNUNET_YES);
1453 session->addrlen = 0; 1453 session->addrlen = 0;
@@ -1458,12 +1458,12 @@ tcp_plugin_get_session (void *cls,
1458 session); 1458 session);
1459 GNUNET_assert (session != NULL); 1459 GNUNET_assert (session != NULL);
1460 GNUNET_assert (GNUNET_OK == 1460 GNUNET_assert (GNUNET_OK ==
1461 GNUNET_CONTAINER_multipeermap_put (plugin->nat_wait_conns, 1461 GNUNET_CONTAINER_multipeermap_put (plugin->nat_wait_conns,
1462 &session->target, 1462 &session->target,
1463 session, 1463 session,
1464 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); 1464 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
1465 1465
1466 LOG (GNUNET_ERROR_TYPE_DEBUG, 1466 LOG (GNUNET_ERROR_TYPE_DEBUG,
1467 "Created NAT WAIT connection to `%4s' at `%s'\n", 1467 "Created NAT WAIT connection to `%4s' at `%s'\n",
1468 GNUNET_i2s (&session->target), GNUNET_a2s (sb, sbs)); 1468 GNUNET_i2s (&session->target), GNUNET_a2s (sb, sbs));
1469 1469
@@ -1471,7 +1471,7 @@ tcp_plugin_get_session (void *cls,
1471 return session; 1471 return session;
1472 else 1472 else
1473 { 1473 {
1474 LOG (GNUNET_ERROR_TYPE_DEBUG, 1474 LOG (GNUNET_ERROR_TYPE_DEBUG,
1475 "Running NAT client for `%4s' at `%s' failed\n", 1475 "Running NAT client for `%4s' at `%s' failed\n",
1476 GNUNET_i2s (&session->target), GNUNET_a2s (sb, sbs)); 1476 GNUNET_i2s (&session->target), GNUNET_a2s (sb, sbs));
1477 disconnect_session (session); 1477 disconnect_session (session);
@@ -1484,7 +1484,7 @@ tcp_plugin_get_session (void *cls,
1484 sa = GNUNET_CONNECTION_create_from_sockaddr (af, sb, sbs); 1484 sa = GNUNET_CONNECTION_create_from_sockaddr (af, sb, sbs);
1485 if (sa == NULL) 1485 if (sa == NULL)
1486 { 1486 {
1487 LOG (GNUNET_ERROR_TYPE_DEBUG, 1487 LOG (GNUNET_ERROR_TYPE_DEBUG,
1488 "Failed to create connection to `%4s' at `%s'\n", 1488 "Failed to create connection to `%4s' at `%s'\n",
1489 GNUNET_i2s (&address->peer), GNUNET_a2s (sb, sbs)); 1489 GNUNET_i2s (&address->peer), GNUNET_a2s (sb, sbs));
1490 return NULL; 1490 return NULL;
@@ -1506,8 +1506,8 @@ tcp_plugin_get_session (void *cls,
1506 session->addrlen = addrlen; 1506 session->addrlen = addrlen;
1507 session->ats_address_network_type = ats.value; 1507 session->ats_address_network_type = ats.value;
1508 1508
1509 GNUNET_CONTAINER_multipeermap_put (plugin->sessionmap, 1509 GNUNET_CONTAINER_multipeermap_put (plugin->sessionmap,
1510 &session->target, 1510 &session->target,
1511 session, GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); 1511 session, GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
1512 inc_sessions (plugin, session, __LINE__); 1512 inc_sessions (plugin, session, __LINE__);
1513 LOG (GNUNET_ERROR_TYPE_DEBUG, 1513 LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -1522,7 +1522,7 @@ tcp_plugin_get_session (void *cls,
1522} 1522}
1523 1523
1524 1524
1525static int 1525static int
1526session_disconnect_it (void *cls, 1526session_disconnect_it (void *cls,
1527 const struct GNUNET_PeerIdentity *key, 1527 const struct GNUNET_PeerIdentity *key,
1528 void *value) 1528 void *value)
@@ -1559,9 +1559,9 @@ tcp_plugin_disconnect (void *cls, const struct GNUNET_PeerIdentity *target)
1559{ 1559{
1560 struct Plugin *plugin = cls; 1560 struct Plugin *plugin = cls;
1561 1561
1562 LOG (GNUNET_ERROR_TYPE_DEBUG, 1562 LOG (GNUNET_ERROR_TYPE_DEBUG,
1563 "Disconnecting peer `%4s'\n", GNUNET_i2s (target)); 1563 "Disconnecting peer `%4s'\n", GNUNET_i2s (target));
1564 GNUNET_CONTAINER_multipeermap_get_multiple (plugin->sessionmap, target, 1564 GNUNET_CONTAINER_multipeermap_get_multiple (plugin->sessionmap, target,
1565 &session_disconnect_it, plugin); 1565 &session_disconnect_it, plugin);
1566 GNUNET_CONTAINER_multipeermap_get_multiple (plugin->nat_wait_conns, target, 1566 GNUNET_CONTAINER_multipeermap_get_multiple (plugin->nat_wait_conns, target,
1567 &session_disconnect_it, plugin); 1567 &session_disconnect_it, plugin);
@@ -1944,12 +1944,12 @@ handle_tcp_nat_probe (void *cls, struct GNUNET_SERVER_Client *client,
1944 clientIdentity); 1944 clientIdentity);
1945 if (session == NULL) 1945 if (session == NULL)
1946 { 1946 {
1947 LOG (GNUNET_ERROR_TYPE_DEBUG, 1947 LOG (GNUNET_ERROR_TYPE_DEBUG,
1948 "Did NOT find session for NAT probe!\n"); 1948 "Did NOT find session for NAT probe!\n");
1949 GNUNET_SERVER_receive_done (client, GNUNET_OK); 1949 GNUNET_SERVER_receive_done (client, GNUNET_OK);
1950 return; 1950 return;
1951 } 1951 }
1952 LOG (GNUNET_ERROR_TYPE_DEBUG, 1952 LOG (GNUNET_ERROR_TYPE_DEBUG,
1953 "Found session for NAT probe!\n"); 1953 "Found session for NAT probe!\n");
1954 1954
1955 if (session->nat_connection_timeout != GNUNET_SCHEDULER_NO_TASK) 1955 if (session->nat_connection_timeout != GNUNET_SCHEDULER_NO_TASK)
@@ -1970,11 +1970,11 @@ handle_tcp_nat_probe (void *cls, struct GNUNET_SERVER_Client *client,
1970 &tcp_nat_probe->clientIdentity, 1970 &tcp_nat_probe->clientIdentity,
1971 session) == GNUNET_YES); 1971 session) == GNUNET_YES);
1972 GNUNET_CONTAINER_multipeermap_put (plugin->sessionmap, 1972 GNUNET_CONTAINER_multipeermap_put (plugin->sessionmap,
1973 &session->target, session, 1973 &session->target, session,
1974 GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); 1974 GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
1975 session->last_activity = GNUNET_TIME_absolute_get (); 1975 session->last_activity = GNUNET_TIME_absolute_get ();
1976 session->inbound = GNUNET_NO; 1976 session->inbound = GNUNET_NO;
1977 LOG (GNUNET_ERROR_TYPE_DEBUG, 1977 LOG (GNUNET_ERROR_TYPE_DEBUG,
1978 "Found address `%s' for incoming connection\n", 1978 "Found address `%s' for incoming connection\n",
1979 GNUNET_a2s (vaddr, alen)); 1979 GNUNET_a2s (vaddr, alen));
1980 switch (((const struct sockaddr *) vaddr)->sa_family) 1980 switch (((const struct sockaddr *) vaddr)->sa_family)
@@ -1999,7 +1999,7 @@ handle_tcp_nat_probe (void *cls, struct GNUNET_SERVER_Client *client,
1999 break; 1999 break;
2000 default: 2000 default:
2001 GNUNET_break_op (0); 2001 GNUNET_break_op (0);
2002 LOG (GNUNET_ERROR_TYPE_DEBUG, 2002 LOG (GNUNET_ERROR_TYPE_DEBUG,
2003 "Bad address for incoming connection!\n"); 2003 "Bad address for incoming connection!\n");
2004 GNUNET_free (vaddr); 2004 GNUNET_free (vaddr);
2005 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 2005 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
@@ -2124,7 +2124,7 @@ handle_tcp_welcome (void *cls, struct GNUNET_SERVER_Client *client,
2124 } 2124 }
2125 else 2125 else
2126 { 2126 {
2127 LOG (GNUNET_ERROR_TYPE_DEBUG, 2127 LOG (GNUNET_ERROR_TYPE_DEBUG,
2128 "Did not obtain TCP socket address for incoming connection\n"); 2128 "Did not obtain TCP socket address for incoming connection\n");
2129 GNUNET_break (0); 2129 GNUNET_break (0);
2130 } 2130 }
@@ -2207,9 +2207,9 @@ handle_tcp_data (void *cls, struct GNUNET_SERVER_Client *client,
2207 /* No inbound session found */ 2207 /* No inbound session found */
2208 void *vaddr; 2208 void *vaddr;
2209 size_t alen; 2209 size_t alen;
2210 2210
2211 GNUNET_SERVER_client_get_address (client, &vaddr, &alen); 2211 GNUNET_SERVER_client_get_address (client, &vaddr, &alen);
2212 LOG (GNUNET_ERROR_TYPE_ERROR, 2212 LOG (GNUNET_ERROR_TYPE_ERROR,
2213 "Received unexpected %u bytes of type %u from `%s'\n", 2213 "Received unexpected %u bytes of type %u from `%s'\n",
2214 (unsigned int) ntohs (message->size), 2214 (unsigned int) ntohs (message->size),
2215 (unsigned int) ntohs (message->type), 2215 (unsigned int) ntohs (message->type),
@@ -2226,7 +2226,7 @@ handle_tcp_data (void *cls, struct GNUNET_SERVER_Client *client,
2226 size_t alen; 2226 size_t alen;
2227 2227
2228 GNUNET_SERVER_client_get_address (client, &vaddr, &alen); 2228 GNUNET_SERVER_client_get_address (client, &vaddr, &alen);
2229 LOG (GNUNET_ERROR_TYPE_ERROR, 2229 LOG (GNUNET_ERROR_TYPE_ERROR,
2230 "Received unexpected %u bytes of type %u from `%s'\n", 2230 "Received unexpected %u bytes of type %u from `%s'\n",
2231 (unsigned int) ntohs (message->size), 2231 (unsigned int) ntohs (message->size),
2232 (unsigned int) ntohs (message->type), 2232 (unsigned int) ntohs (message->type),
@@ -2238,7 +2238,7 @@ handle_tcp_data (void *cls, struct GNUNET_SERVER_Client *client,
2238 } 2238 }
2239 2239
2240 session->last_activity = GNUNET_TIME_absolute_get (); 2240 session->last_activity = GNUNET_TIME_absolute_get ();
2241 LOG (GNUNET_ERROR_TYPE_DEBUG, 2241 LOG (GNUNET_ERROR_TYPE_DEBUG,
2242 "Passing %u bytes of type %u from `%4s' to transport service.\n", 2242 "Passing %u bytes of type %u from `%4s' to transport service.\n",
2243 (unsigned int) ntohs (message->size), 2243 (unsigned int) ntohs (message->size),
2244 (unsigned int) ntohs (message->type), 2244 (unsigned int) ntohs (message->type),
@@ -2277,7 +2277,7 @@ handle_tcp_data (void *cls, struct GNUNET_SERVER_Client *client,
2277 } 2277 }
2278 else 2278 else
2279 { 2279 {
2280 LOG (GNUNET_ERROR_TYPE_DEBUG, 2280 LOG (GNUNET_ERROR_TYPE_DEBUG,
2281 "Throttling receiving from `%s' for %s\n", 2281 "Throttling receiving from `%s' for %s\n",
2282 GNUNET_i2s (&session->target), 2282 GNUNET_i2s (&session->target),
2283 GNUNET_STRINGS_relative_time_to_string (delay, GNUNET_YES)); 2283 GNUNET_STRINGS_relative_time_to_string (delay, GNUNET_YES));
@@ -2450,7 +2450,7 @@ start_session_timeout (struct Session *s)
2450 s); 2450 s);
2451 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2451 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2452 "Timeout for session %p set to %s\n", 2452 "Timeout for session %p set to %s\n",
2453 s, 2453 s,
2454 GNUNET_STRINGS_relative_time_to_string (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT, 2454 GNUNET_STRINGS_relative_time_to_string (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT,
2455 GNUNET_YES)); 2455 GNUNET_YES));
2456} 2456}
@@ -2471,7 +2471,7 @@ reschedule_session_timeout (struct Session *s)
2471 s); 2471 s);
2472 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2472 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2473 "Timeout rescheduled for session %p set to %s\n", 2473 "Timeout rescheduled for session %p set to %s\n",
2474 s, 2474 s,
2475 GNUNET_STRINGS_relative_time_to_string (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT, 2475 GNUNET_STRINGS_relative_time_to_string (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT,
2476 GNUNET_YES)); 2476 GNUNET_YES));
2477} 2477}
@@ -2571,7 +2571,7 @@ libgnunet_plugin_transport_tcp_init (void *cls)
2571 "ADVERTISED-PORT", &aport)) && 2571 "ADVERTISED-PORT", &aport)) &&
2572 (aport > 65535))) 2572 (aport > 65535)))
2573 { 2573 {
2574 LOG (GNUNET_ERROR_TYPE_ERROR, 2574 LOG (GNUNET_ERROR_TYPE_ERROR,
2575 _ 2575 _
2576 ("Require valid port number for service `%s' in configuration!\n"), 2576 ("Require valid port number for service `%s' in configuration!\n"),
2577 "transport-tcp"); 2577 "transport-tcp");
@@ -2613,7 +2613,7 @@ libgnunet_plugin_transport_tcp_init (void *cls)
2613 { 2613 {
2614 for (ret = ret_s-1; ret >= 0; ret--) 2614 for (ret = ret_s-1; ret >= 0; ret--)
2615 LOG (GNUNET_ERROR_TYPE_INFO, 2615 LOG (GNUNET_ERROR_TYPE_INFO,
2616 "Binding to address `%s'\n", 2616 "Binding to address `%s'\n",
2617 GNUNET_a2s (addrs[ret], addrlens[ret])); 2617 GNUNET_a2s (addrs[ret], addrlens[ret]));
2618 plugin->nat = 2618 plugin->nat =
2619 GNUNET_NAT_register (env->cfg, GNUNET_YES, aport, (unsigned int) ret_s, 2619 GNUNET_NAT_register (env->cfg, GNUNET_YES, aport, (unsigned int) ret_s,
@@ -2679,14 +2679,14 @@ libgnunet_plugin_transport_tcp_init (void *cls)
2679 GNUNET_SERVER_disconnect_notify (plugin->server, &disconnect_notify, plugin); 2679 GNUNET_SERVER_disconnect_notify (plugin->server, &disconnect_notify, plugin);
2680 plugin->nat_wait_conns = GNUNET_CONTAINER_multipeermap_create (16, GNUNET_YES); 2680 plugin->nat_wait_conns = GNUNET_CONTAINER_multipeermap_create (16, GNUNET_YES);
2681 if (bport != 0) 2681 if (bport != 0)
2682 LOG (GNUNET_ERROR_TYPE_INFO, 2682 LOG (GNUNET_ERROR_TYPE_INFO,
2683 _("TCP transport listening on port %llu\n"), bport); 2683 _("TCP transport listening on port %llu\n"), bport);
2684 else 2684 else
2685 LOG (GNUNET_ERROR_TYPE_INFO, 2685 LOG (GNUNET_ERROR_TYPE_INFO,
2686 _ 2686 _
2687 ("TCP transport not listening on any port (client only)\n")); 2687 ("TCP transport not listening on any port (client only)\n"));
2688 if (aport != bport) 2688 if (aport != bport)
2689 LOG (GNUNET_ERROR_TYPE_INFO, 2689 LOG (GNUNET_ERROR_TYPE_INFO,
2690 _ 2690 _
2691 ("TCP transport advertises itself as being on port %llu\n"), 2691 ("TCP transport advertises itself as being on port %llu\n"),
2692 aport); 2692 aport);