diff options
-rw-r--r-- | src/dv/dv_api.c | 6 | ||||
-rw-r--r-- | src/dv/gnunet-service-dv.c | 3 | ||||
-rw-r--r-- | src/dv/test_transport_api_dv_peer3.conf | 6 |
3 files changed, 7 insertions, 8 deletions
diff --git a/src/dv/dv_api.c b/src/dv/dv_api.c index abfb249e4..4418f3a0f 100644 --- a/src/dv/dv_api.c +++ b/src/dv/dv_api.c | |||
@@ -291,9 +291,6 @@ void handle_message_receipt (void *cls, | |||
291 | return; /* Connection closed? */ | 291 | return; /* Connection closed? */ |
292 | } | 292 | } |
293 | 293 | ||
294 | #if DEBUG_DV | ||
295 | fprintf(stdout, "dv api receives message of type %d or raw %d\n", ntohs(msg->type), msg->type); | ||
296 | #endif | ||
297 | GNUNET_assert(ntohs(msg->type) == GNUNET_MESSAGE_TYPE_TRANSPORT_DV_RECEIVE); | 294 | GNUNET_assert(ntohs(msg->type) == GNUNET_MESSAGE_TYPE_TRANSPORT_DV_RECEIVE); |
298 | 295 | ||
299 | if (ntohs(msg->size) < sizeof(struct GNUNET_DV_MessageReceived)) | 296 | if (ntohs(msg->size) < sizeof(struct GNUNET_DV_MessageReceived)) |
@@ -302,6 +299,9 @@ void handle_message_receipt (void *cls, | |||
302 | received_msg = (struct GNUNET_DV_MessageReceived *)msg; | 299 | received_msg = (struct GNUNET_DV_MessageReceived *)msg; |
303 | packed_msg_len = ntohs(received_msg->msg_len); | 300 | packed_msg_len = ntohs(received_msg->msg_len); |
304 | sender_address_len = ntohs(received_msg->sender_address_len); | 301 | sender_address_len = ntohs(received_msg->sender_address_len); |
302 | #if DEBUG_DV | ||
303 | fprintf(stdout, "dv api receives message from service: total len: %lu, packed len: %lu, sender_address_len: %lu, base message len: %lu\ntotal is %lu, should be %lu\n", ntohs(msg->size), packed_msg_len, sender_address_len, sizeof(struct GNUNET_DV_MessageReceived), sizeof(struct GNUNET_DV_MessageReceived) + packed_msg_len + sender_address_len, ntohs(msg->size)); | ||
304 | #endif | ||
305 | GNUNET_assert(ntohs(msg->size) == (sizeof(struct GNUNET_DV_MessageReceived) + packed_msg_len + sender_address_len)); | 305 | GNUNET_assert(ntohs(msg->size) == (sizeof(struct GNUNET_DV_MessageReceived) + packed_msg_len + sender_address_len)); |
306 | 306 | ||
307 | sender_address = GNUNET_malloc(sender_address_len); | 307 | sender_address = GNUNET_malloc(sender_address_len); |
diff --git a/src/dv/gnunet-service-dv.c b/src/dv/gnunet-service-dv.c index ce996dda3..bff6c4ae4 100644 --- a/src/dv/gnunet-service-dv.c +++ b/src/dv/gnunet-service-dv.c | |||
@@ -472,7 +472,7 @@ void send_to_plugin(const struct GNUNET_PeerIdentity * sender, | |||
472 | received_msg = GNUNET_malloc(size); | 472 | received_msg = GNUNET_malloc(size); |
473 | received_msg->header.size = htons(size); | 473 | received_msg->header.size = htons(size); |
474 | received_msg->header.type = htons(GNUNET_MESSAGE_TYPE_TRANSPORT_DV_RECEIVE); | 474 | received_msg->header.type = htons(GNUNET_MESSAGE_TYPE_TRANSPORT_DV_RECEIVE); |
475 | received_msg->sender_address_len = sizeof(struct GNUNET_PeerIdentity); | 475 | received_msg->sender_address_len = htons(sizeof(struct GNUNET_PeerIdentity)); |
476 | received_msg->distance = htonl(cost); | 476 | received_msg->distance = htonl(cost); |
477 | received_msg->msg_len = htons(message_size); | 477 | received_msg->msg_len = htons(message_size); |
478 | /* Set the sender in this message to be the original sender! */ | 478 | /* Set the sender in this message to be the original sender! */ |
@@ -833,7 +833,6 @@ handle_start (void *cls, | |||
833 | "Received `%s' request from client\n", "START"); | 833 | "Received `%s' request from client\n", "START"); |
834 | #endif | 834 | #endif |
835 | 835 | ||
836 | GNUNET_assert(client_handle == NULL); | ||
837 | client_handle = client; | 836 | client_handle = client; |
838 | 837 | ||
839 | GNUNET_SERVER_receive_done (client, GNUNET_OK); | 838 | GNUNET_SERVER_receive_done (client, GNUNET_OK); |
diff --git a/src/dv/test_transport_api_dv_peer3.conf b/src/dv/test_transport_api_dv_peer3.conf index 413817cfe..66100488e 100644 --- a/src/dv/test_transport_api_dv_peer3.conf +++ b/src/dv/test_transport_api_dv_peer3.conf | |||
@@ -46,18 +46,18 @@ MINIMUM-FRIENDS = 0 | |||
46 | 46 | ||
47 | [transport] | 47 | [transport] |
48 | PLUGINS = tcp dv | 48 | PLUGINS = tcp dv |
49 | #DEBUG = NO | 49 | DEBUG = YES |
50 | # PREFIX = | 50 | # PREFIX = |
51 | ALLOW_SHUTDOWN = YES | 51 | ALLOW_SHUTDOWN = YES |
52 | ACCEPT_FROM6 = ::1; | 52 | ACCEPT_FROM6 = ::1; |
53 | ACCEPT_FROM = 127.0.0.1; | 53 | ACCEPT_FROM = 127.0.0.1; |
54 | NEIGHBOUR_LIMIT = 50 | 54 | NEIGHBOUR_LIMIT = 50 |
55 | BINARY = gnunet-service-transport | 55 | BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/transport/.libs/gnunet-service-transport |
56 | CONFIG = $DEFAULTCONFIG | 56 | CONFIG = $DEFAULTCONFIG |
57 | HOME = $SERVICEHOME | 57 | HOME = $SERVICEHOME |
58 | HOSTNAME = localhost | 58 | HOSTNAME = localhost |
59 | PORT = 32365 | 59 | PORT = 32365 |
60 | #PREFIX = xterm -T transport1 -e gdb --command=cmd --args | 60 | PREFIX = xterm -T transport1 -e gdb --command=cmd --args |
61 | #PREFIX = valgrind --leak-check=full | 61 | #PREFIX = valgrind --leak-check=full |
62 | 62 | ||
63 | [peerinfo] | 63 | [peerinfo] |