diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-02-05 15:48:14 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-02-05 15:48:14 +0000 |
commit | f37e4f3d2345a537833d147eb7eb40f16b254c0d (patch) | |
tree | 589f67bc26b555c9c5b19336f93eb712da93d2c9 /src/transport | |
parent | 596599880b00619606fd498e79e00d7ca45b64ab (diff) | |
download | gnunet-f37e4f3d2345a537833d147eb7eb40f16b254c0d.tar.gz gnunet-f37e4f3d2345a537833d147eb7eb40f16b254c0d.zip |
cleanup
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/gnunet-nat-client.c | 10 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport.c | 3 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/transport/gnunet-nat-client.c b/src/transport/gnunet-nat-client.c index 3bf409461..0fce09e71 100644 --- a/src/transport/gnunet-nat-client.c +++ b/src/transport/gnunet-nat-client.c | |||
@@ -42,27 +42,27 @@ | |||
42 | #include <netinet/ip_icmp.h> | 42 | #include <netinet/ip_icmp.h> |
43 | #include <netinet/in.h> | 43 | #include <netinet/in.h> |
44 | 44 | ||
45 | #define DEBUG 0 | 45 | #define DEBUG 1 |
46 | 46 | ||
47 | /** | 47 | /** |
48 | * Number of UDP ports to keep open (typically >= 256) | 48 | * Number of UDP ports to keep open (typically >= 256) |
49 | */ | 49 | */ |
50 | #define NUM_UDP_PORTS 256 | 50 | #define NUM_UDP_PORTS 1024 |
51 | 51 | ||
52 | /** | 52 | /** |
53 | * Number of ICMP replies to send per message received (typically >= 1024) | 53 | * Number of ICMP replies to send per message received (typically >= 1024) |
54 | */ | 54 | */ |
55 | #define NUM_ICMP_REPLIES 1024 | 55 | #define NUM_ICMP_REPLIES 10240 |
56 | 56 | ||
57 | /** | 57 | /** |
58 | * How often do we send our UDP messages to keep ports open? (typically < 100ms) | 58 | * How often do we send our UDP messages to keep ports open? (typically < 100ms) |
59 | */ | 59 | */ |
60 | #define UDP_SEND_FREQUENCY_MS 50 | 60 | #define UDP_SEND_FREQUENCY_MS 10 |
61 | 61 | ||
62 | /** | 62 | /** |
63 | * Port we use for the dummy target. | 63 | * Port we use for the dummy target. |
64 | */ | 64 | */ |
65 | #define NAT_TRAV_PORT 2222 | 65 | #define NAT_TRAV_PORT 22223 |
66 | 66 | ||
67 | /** | 67 | /** |
68 | * How often do we retry to open and bind a UDP socket before giving up? | 68 | * How often do we retry to open and bind a UDP socket before giving up? |
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 84158584f..6a8b2db5e 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -1136,7 +1136,6 @@ find_ready_address(struct NeighborList *neighbor) | |||
1136 | struct ReadyList *head = neighbor->plugins; | 1136 | struct ReadyList *head = neighbor->plugins; |
1137 | struct PeerAddressList *addresses; | 1137 | struct PeerAddressList *addresses; |
1138 | struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get (); | 1138 | struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get (); |
1139 | struct GNUNET_TIME_Relative min_latency = GNUNET_TIME_relative_get_forever(); | ||
1140 | struct PeerAddressList *best_address; | 1139 | struct PeerAddressList *best_address; |
1141 | 1140 | ||
1142 | best_address = NULL; | 1141 | best_address = NULL; |
@@ -1168,7 +1167,7 @@ find_ready_address(struct NeighborList *neighbor) | |||
1168 | #if DEBUG_TRANSPORT | 1167 | #if DEBUG_TRANSPORT |
1169 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1168 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1170 | "Found address with latency %llu (previous best was %llu), setting as best found yet!\n", | 1169 | "Found address with latency %llu (previous best was %llu), setting as best found yet!\n", |
1171 | addresses->latency.value, best_address == NULL ? min_latency.value : best_address->latency.value); | 1170 | addresses->latency.value, best_address == NULL ? -1LL : best_address->latency.value); |
1172 | #endif | 1171 | #endif |
1173 | best_address = addresses; | 1172 | best_address = addresses; |
1174 | } | 1173 | } |