diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-05-27 11:59:05 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-05-27 11:59:05 +0000 |
commit | 08a5d4f3b225f3b1f4bdb87faf67fb052c1ec0b8 (patch) | |
tree | b332cebfbba20b3c830ad0dde9ac27d7e47b2f46 | |
parent | d34cadddefa8b4d216eb31c7123e6884497a11b6 (diff) | |
download | gnunet-08a5d4f3b225f3b1f4bdb87faf67fb052c1ec0b8.tar.gz gnunet-08a5d4f3b225f3b1f4bdb87faf67fb052c1ec0b8.zip |
bug hunting
-rw-r--r-- | src/transport/gnunet-service-transport_clients.c | 5 | ||||
-rw-r--r-- | src/transport/transport_api_address_to_string.c | 16 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/transport/gnunet-service-transport_clients.c b/src/transport/gnunet-service-transport_clients.c index f3050b6e9..943c5679d 100644 --- a/src/transport/gnunet-service-transport_clients.c +++ b/src/transport/gnunet-service-transport_clients.c | |||
@@ -571,7 +571,7 @@ clients_handle_start (void *cls, struct GNUNET_SERVER_Client *client, | |||
571 | 571 | ||
572 | tc = lookup_client (client); | 572 | tc = lookup_client (client); |
573 | 573 | ||
574 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, | 574 | GNUNET_log (GNUNET_ERROR_TYPE_INFO | GNUNET_ERROR_TYPE_BULK, |
575 | "Client %p sent START\n", tc); | 575 | "Client %p sent START\n", tc); |
576 | if (tc != NULL) | 576 | if (tc != NULL) |
577 | { | 577 | { |
@@ -885,6 +885,9 @@ transmit_address_to_client (void *cls, const char *buf) | |||
885 | atsm->header.type = ntohs (GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING_REPLY); | 885 | atsm->header.type = ntohs (GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING_REPLY); |
886 | atsm->res = htonl (GNUNET_NO); | 886 | atsm->res = htonl (GNUNET_NO); |
887 | atsm->addr_len = htonl (0); | 887 | atsm->addr_len = htonl (0); |
888 | |||
889 | /* BUG HUNTING */ | ||
890 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Failed to convert address for client %p\n", actx->tc); | ||
888 | } | 891 | } |
889 | 892 | ||
890 | if (NULL == buf) | 893 | if (NULL == buf) |
diff --git a/src/transport/transport_api_address_to_string.c b/src/transport/transport_api_address_to_string.c index 96b321dea..932085f8c 100644 --- a/src/transport/transport_api_address_to_string.c +++ b/src/transport/transport_api_address_to_string.c | |||
@@ -104,6 +104,9 @@ address_response_processor (void *cls, const struct GNUNET_MessageHeader *msg) | |||
104 | 104 | ||
105 | if (GNUNET_NO == result) | 105 | if (GNUNET_NO == result) |
106 | { | 106 | { |
107 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Client %p failed to resolve address \n", | ||
108 | alucb->client); | ||
109 | |||
107 | alucb->cb (alucb->cb_cls, empty_str, GNUNET_SYSERR); | 110 | alucb->cb (alucb->cb_cls, empty_str, GNUNET_SYSERR); |
108 | 111 | ||
109 | /* expect more replies */ | 112 | /* expect more replies */ |
@@ -127,15 +130,7 @@ address_response_processor (void *cls, const struct GNUNET_MessageHeader *msg) | |||
127 | /* expect more replies */ | 130 | /* expect more replies */ |
128 | GNUNET_CLIENT_receive (alucb->client, &address_response_processor, alucb, | 131 | GNUNET_CLIENT_receive (alucb->client, &address_response_processor, alucb, |
129 | GNUNET_TIME_absolute_get_remaining (alucb->timeout)); | 132 | GNUNET_TIME_absolute_get_remaining (alucb->timeout)); |
130 | 133 | alucb->cb (alucb->cb_cls, address, GNUNET_OK); | |
131 | if (GNUNET_NO == result) | ||
132 | { | ||
133 | alucb->cb (alucb->cb_cls, empty_str, GNUNET_SYSERR); | ||
134 | } | ||
135 | else | ||
136 | { | ||
137 | alucb->cb (alucb->cb_cls, address, GNUNET_OK); | ||
138 | } | ||
139 | } | 134 | } |
140 | 135 | ||
141 | 136 | ||
@@ -180,6 +175,9 @@ GNUNET_TRANSPORT_address_to_string (const struct GNUNET_CONFIGURATION_Handle | |||
180 | client = GNUNET_CLIENT_connect ("transport", cfg); | 175 | client = GNUNET_CLIENT_connect ("transport", cfg); |
181 | if (NULL == client) | 176 | if (NULL == client) |
182 | return NULL; | 177 | return NULL; |
178 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Client %p tries to resolve for peer `%s'address len %u \n", | ||
179 | client, GNUNET_i2s (&address->peer), address->address_length); | ||
180 | |||
183 | msg = GNUNET_malloc (len); | 181 | msg = GNUNET_malloc (len); |
184 | msg->header.size = htons (len); | 182 | msg->header.size = htons (len); |
185 | msg->header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING); | 183 | msg->header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING); |