diff options
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/gnunet-service-transport.c | 10 | ||||
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 4 | ||||
-rw-r--r-- | src/transport/transport.h | 10 |
3 files changed, 13 insertions, 11 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 4064b97a9..22a3d58f4 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -138,16 +138,6 @@ | |||
138 | #define HELLO_REVALIDATION_START_TIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 1) | 138 | #define HELLO_REVALIDATION_START_TIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 1) |
139 | 139 | ||
140 | /** | 140 | /** |
141 | * Maximum frequency for re-evaluating latencies for all transport addresses. | ||
142 | */ | ||
143 | #define LATENCY_EVALUATION_MAX_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 1) | ||
144 | |||
145 | /** | ||
146 | * Maximum frequency for re-evaluating latencies for connected addresses. | ||
147 | */ | ||
148 | #define CONNECTED_LATENCY_EVALUATION_MAX_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 1) | ||
149 | |||
150 | /** | ||
151 | * List of addresses of other peers | 141 | * List of addresses of other peers |
152 | */ | 142 | */ |
153 | struct ForeignAddressList | 143 | struct ForeignAddressList |
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 12c2a1a2f..0e61d1649 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -42,7 +42,6 @@ | |||
42 | 42 | ||
43 | #define DEBUG_TCP_NAT GNUNET_NO | 43 | #define DEBUG_TCP_NAT GNUNET_NO |
44 | 44 | ||
45 | |||
46 | /** | 45 | /** |
47 | * Initial handshake message for a session. | 46 | * Initial handshake message for a session. |
48 | */ | 47 | */ |
@@ -1191,6 +1190,8 @@ tcp_plugin_send (void *cls, | |||
1191 | } | 1190 | } |
1192 | GNUNET_assert (session != NULL); | 1191 | GNUNET_assert (session != NULL); |
1193 | GNUNET_assert (session->client != NULL); | 1192 | GNUNET_assert (session->client != NULL); |
1193 | |||
1194 | GNUNET_SERVER_client_set_timeout(session->client, CONNECTED_LATENCY_EVALUATION_MAX_DELAY); | ||
1194 | GNUNET_STATISTICS_update (plugin->env->stats, | 1195 | GNUNET_STATISTICS_update (plugin->env->stats, |
1195 | gettext_noop ("# bytes currently in TCP buffers"), | 1196 | gettext_noop ("# bytes currently in TCP buffers"), |
1196 | msgbuf_size, | 1197 | msgbuf_size, |
@@ -1739,6 +1740,7 @@ handle_tcp_welcome (void *cls, | |||
1739 | } | 1740 | } |
1740 | session->last_activity = GNUNET_TIME_absolute_get (); | 1741 | session->last_activity = GNUNET_TIME_absolute_get (); |
1741 | session->expecting_welcome = GNUNET_NO; | 1742 | session->expecting_welcome = GNUNET_NO; |
1743 | GNUNET_SERVER_client_set_timeout(client, CONNECTED_LATENCY_EVALUATION_MAX_DELAY); | ||
1742 | GNUNET_SERVER_receive_done (client, GNUNET_OK); | 1744 | GNUNET_SERVER_receive_done (client, GNUNET_OK); |
1743 | } | 1745 | } |
1744 | 1746 | ||
diff --git a/src/transport/transport.h b/src/transport/transport.h index 89e50b73f..1c6aaa2a9 100644 --- a/src/transport/transport.h +++ b/src/transport/transport.h | |||
@@ -49,6 +49,16 @@ | |||
49 | #define MIN_QUOTA_REFRESH_TIME 2000 | 49 | #define MIN_QUOTA_REFRESH_TIME 2000 |
50 | 50 | ||
51 | /** | 51 | /** |
52 | * Maximum frequency for re-evaluating latencies for all transport addresses. | ||
53 | */ | ||
54 | #define LATENCY_EVALUATION_MAX_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 1) | ||
55 | |||
56 | /** | ||
57 | * Maximum frequency for re-evaluating latencies for connected addresses. | ||
58 | */ | ||
59 | #define CONNECTED_LATENCY_EVALUATION_MAX_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 1) | ||
60 | |||
61 | /** | ||
52 | * Message from the transport service to the library | 62 | * Message from the transport service to the library |
53 | * asking to check if both processes agree about this | 63 | * asking to check if both processes agree about this |
54 | * peers identity. | 64 | * peers identity. |