summaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-02-10 15:39:14 +0000
committerNathan S. Evans <evans@in.tum.de>2010-02-10 15:39:14 +0000
commit1366ecaaa9c01dc3d9596fd48d53c50a29f17e02 (patch)
tree60161c4f9b2cd4e3ce9901a7b857398edcb02368 /src/transport
parent2d5e52d4afd381a776a6ee5da5c80255e47ed9fc (diff)
dce
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/test_transport_api.c2
-rw-r--r--src/transport/test_transport_api_tcp_peer1.conf4
-rw-r--r--src/transport/test_transport_api_udp_peer1.conf6
-rw-r--r--src/transport/transport.h2
-rw-r--r--src/transport/transport_api.c20
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
end_badly ()
{
/* do work here */
+#if VERBOSE
fprintf(stderr, "Ending on an unhappy note.\n");
+#endif
GNUNET_TRANSPORT_disconnect (p1.th);
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
[transport]
PLUGINS = tcp
-DEBUG = NO
-PREFIX =
+#DEBUG = YES
+PREFIX = valgrind --leak-check=full --log-file=valgrind_tcp_peer1.log
ALLOW_SHUTDOWN = YES
ACCEPT_FROM6 = ::1;
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
[transport]
PLUGINS = udp
DEBUG = NO
-PREFIX =
ALLOW_SHUTDOWN = YES
ACCEPT_FROM6 = ::1;
ACCEPT_FROM = 127.0.0.1;
NEIGHBOUR_LIMIT = 50
-BINARY = gnunet-service-transport
+#BINARY = gnunet-service-transport
+BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/transport/.libs/gnunet-service-transport
CONFIG = $DEFAULTCONFIG
HOME = $SERVICEHOME
HOSTNAME = localhost
PORT = 12365
+#PREFIX = valgrind --track-origins=yes --leak-check=full --log-file=valgrind_udp_peer1.log
+PREFIX = xterm -e xterm -T transport -e gdb --args
[peerinfo]
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 @@
#include "gnunet_time_lib.h"
#include "gnunet_transport_service.h"
-#define DEBUG_TRANSPORT GNUNET_NO
+#define DEBUG_TRANSPORT GNUNET_YES
/**
* 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
*/
void *rec_cls;
- /**
- * When to time out (call rec with NULL).
- */
- struct GNUNET_TIME_Absolute timeout;
-
- /**
- * Timeout task (used to trigger timeout,
- * cancel if we get the HELLO in time).
- */
- GNUNET_SCHEDULER_TaskIdentifier task;
-
-
};
@@ -888,7 +876,7 @@ GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle,
if (handle->client == NULL)
{
#if DEBUG_TRANSPORT
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Not connected to transport service, dropping offered HELLO\n");
#endif
return;
@@ -1478,7 +1466,6 @@ GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle)
while (NULL != (hwl = handle->hwl_head))
{
handle->hwl_head = hwl->next;
- GNUNET_SCHEDULER_cancel (handle->sched, hwl->task);
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
("Disconnect while notification for `%s' still registered.\n"),
@@ -1926,6 +1913,11 @@ GNUNET_TRANSPORT_notify_transmit_ready (struct GNUNET_TRANSPORT_Handle
if (size + sizeof (struct OutboundMessage) >=
GNUNET_SERVER_MAX_MESSAGE_SIZE)
{
+#if DEBUG_TRANSPORT
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Message size is %d, max allowed is %d.\n",
+ size + sizeof (struct OutboundMessage), GNUNET_SERVER_MAX_MESSAGE_SIZE);
+#endif
GNUNET_break (0);
return NULL;
}