diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-02-10 15:39:14 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-02-10 15:39:14 +0000 |
commit | 1366ecaaa9c01dc3d9596fd48d53c50a29f17e02 (patch) | |
tree | 60161c4f9b2cd4e3ce9901a7b857398edcb02368 /src | |
parent | 2d5e52d4afd381a776a6ee5da5c80255e47ed9fc (diff) | |
download | gnunet-1366ecaaa9c01dc3d9596fd48d53c50a29f17e02.tar.gz gnunet-1366ecaaa9c01dc3d9596fd48d53c50a29f17e02.zip |
dce
Diffstat (limited to 'src')
-rw-r--r-- | src/transport/test_transport_api.c | 2 | ||||
-rw-r--r-- | src/transport/test_transport_api_tcp_peer1.conf | 4 | ||||
-rw-r--r-- | src/transport/test_transport_api_udp_peer1.conf | 6 | ||||
-rw-r--r-- | src/transport/transport.h | 2 | ||||
-rw-r--r-- | src/transport/transport_api.c | 20 |
5 files changed, 15 insertions, 19 deletions
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c index b761f33af..85d6c244c 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c | |||
@@ -107,7 +107,9 @@ static void | |||
107 | end_badly () | 107 | end_badly () |
108 | { | 108 | { |
109 | /* do work here */ | 109 | /* do work here */ |
110 | #if VERBOSE | ||
110 | fprintf(stderr, "Ending on an unhappy note.\n"); | 111 | fprintf(stderr, "Ending on an unhappy note.\n"); |
112 | #endif | ||
111 | 113 | ||
112 | GNUNET_TRANSPORT_disconnect (p1.th); | 114 | GNUNET_TRANSPORT_disconnect (p1.th); |
113 | GNUNET_TRANSPORT_disconnect (p2.th); | 115 | GNUNET_TRANSPORT_disconnect (p2.th); |
diff --git a/src/transport/test_transport_api_tcp_peer1.conf b/src/transport/test_transport_api_tcp_peer1.conf index 7af00db9c..dbe760732 100644 --- a/src/transport/test_transport_api_tcp_peer1.conf +++ b/src/transport/test_transport_api_tcp_peer1.conf | |||
@@ -61,8 +61,8 @@ PORT = 2092 | |||
61 | 61 | ||
62 | [transport] | 62 | [transport] |
63 | PLUGINS = tcp | 63 | PLUGINS = tcp |
64 | DEBUG = NO | 64 | #DEBUG = YES |
65 | PREFIX = | 65 | PREFIX = valgrind --leak-check=full --log-file=valgrind_tcp_peer1.log |
66 | ALLOW_SHUTDOWN = YES | 66 | ALLOW_SHUTDOWN = YES |
67 | ACCEPT_FROM6 = ::1; | 67 | ACCEPT_FROM6 = ::1; |
68 | ACCEPT_FROM = 127.0.0.1; | 68 | ACCEPT_FROM = 127.0.0.1; |
diff --git a/src/transport/test_transport_api_udp_peer1.conf b/src/transport/test_transport_api_udp_peer1.conf index 6a3200b01..a90c1431d 100644 --- a/src/transport/test_transport_api_udp_peer1.conf +++ b/src/transport/test_transport_api_udp_peer1.conf | |||
@@ -62,16 +62,18 @@ PORT = 2092 | |||
62 | [transport] | 62 | [transport] |
63 | PLUGINS = udp | 63 | PLUGINS = udp |
64 | DEBUG = NO | 64 | DEBUG = NO |
65 | PREFIX = | ||
66 | ALLOW_SHUTDOWN = YES | 65 | ALLOW_SHUTDOWN = YES |
67 | ACCEPT_FROM6 = ::1; | 66 | ACCEPT_FROM6 = ::1; |
68 | ACCEPT_FROM = 127.0.0.1; | 67 | ACCEPT_FROM = 127.0.0.1; |
69 | NEIGHBOUR_LIMIT = 50 | 68 | NEIGHBOUR_LIMIT = 50 |
70 | BINARY = gnunet-service-transport | 69 | #BINARY = gnunet-service-transport |
70 | BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/transport/.libs/gnunet-service-transport | ||
71 | CONFIG = $DEFAULTCONFIG | 71 | CONFIG = $DEFAULTCONFIG |
72 | HOME = $SERVICEHOME | 72 | HOME = $SERVICEHOME |
73 | HOSTNAME = localhost | 73 | HOSTNAME = localhost |
74 | PORT = 12365 | 74 | PORT = 12365 |
75 | #PREFIX = valgrind --track-origins=yes --leak-check=full --log-file=valgrind_udp_peer1.log | ||
76 | PREFIX = xterm -e xterm -T transport -e gdb --args | ||
75 | 77 | ||
76 | [peerinfo] | 78 | [peerinfo] |
77 | TRUST = $SERVICEHOME/data/credit/ | 79 | TRUST = $SERVICEHOME/data/credit/ |
diff --git a/src/transport/transport.h b/src/transport/transport.h index 89f004ab8..603f1bbc1 100644 --- a/src/transport/transport.h +++ b/src/transport/transport.h | |||
@@ -30,7 +30,7 @@ | |||
30 | #include "gnunet_time_lib.h" | 30 | #include "gnunet_time_lib.h" |
31 | #include "gnunet_transport_service.h" | 31 | #include "gnunet_transport_service.h" |
32 | 32 | ||
33 | #define DEBUG_TRANSPORT GNUNET_NO | 33 | #define DEBUG_TRANSPORT GNUNET_YES |
34 | 34 | ||
35 | /** | 35 | /** |
36 | * For how long do we allow unused bandwidth | 36 | * For how long do we allow unused bandwidth |
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c index 0c75ce9f7..ae07421d8 100644 --- a/src/transport/transport_api.c +++ b/src/transport/transport_api.c | |||
@@ -146,18 +146,6 @@ struct HelloWaitList | |||
146 | */ | 146 | */ |
147 | void *rec_cls; | 147 | void *rec_cls; |
148 | 148 | ||
149 | /** | ||
150 | * When to time out (call rec with NULL). | ||
151 | */ | ||
152 | struct GNUNET_TIME_Absolute timeout; | ||
153 | |||
154 | /** | ||
155 | * Timeout task (used to trigger timeout, | ||
156 | * cancel if we get the HELLO in time). | ||
157 | */ | ||
158 | GNUNET_SCHEDULER_TaskIdentifier task; | ||
159 | |||
160 | |||
161 | }; | 149 | }; |
162 | 150 | ||
163 | 151 | ||
@@ -888,7 +876,7 @@ GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle, | |||
888 | if (handle->client == NULL) | 876 | if (handle->client == NULL) |
889 | { | 877 | { |
890 | #if DEBUG_TRANSPORT | 878 | #if DEBUG_TRANSPORT |
891 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 879 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
892 | "Not connected to transport service, dropping offered HELLO\n"); | 880 | "Not connected to transport service, dropping offered HELLO\n"); |
893 | #endif | 881 | #endif |
894 | return; | 882 | return; |
@@ -1478,7 +1466,6 @@ GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle) | |||
1478 | while (NULL != (hwl = handle->hwl_head)) | 1466 | while (NULL != (hwl = handle->hwl_head)) |
1479 | { | 1467 | { |
1480 | handle->hwl_head = hwl->next; | 1468 | handle->hwl_head = hwl->next; |
1481 | GNUNET_SCHEDULER_cancel (handle->sched, hwl->task); | ||
1482 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1469 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
1483 | _ | 1470 | _ |
1484 | ("Disconnect while notification for `%s' still registered.\n"), | 1471 | ("Disconnect while notification for `%s' still registered.\n"), |
@@ -1926,6 +1913,11 @@ GNUNET_TRANSPORT_notify_transmit_ready (struct GNUNET_TRANSPORT_Handle | |||
1926 | if (size + sizeof (struct OutboundMessage) >= | 1913 | if (size + sizeof (struct OutboundMessage) >= |
1927 | GNUNET_SERVER_MAX_MESSAGE_SIZE) | 1914 | GNUNET_SERVER_MAX_MESSAGE_SIZE) |
1928 | { | 1915 | { |
1916 | #if DEBUG_TRANSPORT | ||
1917 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1918 | "Message size is %d, max allowed is %d.\n", | ||
1919 | size + sizeof (struct OutboundMessage), GNUNET_SERVER_MAX_MESSAGE_SIZE); | ||
1920 | #endif | ||
1929 | GNUNET_break (0); | 1921 | GNUNET_break (0); |
1930 | return NULL; | 1922 | return NULL; |
1931 | } | 1923 | } |