diff options
Diffstat (limited to 'src/nat/gnunet-nat-server.c')
-rw-r--r-- | src/nat/gnunet-nat-server.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/nat/gnunet-nat-server.c b/src/nat/gnunet-nat-server.c index 0336ecc..9b6846c 100644 --- a/src/nat/gnunet-nat-server.c +++ b/src/nat/gnunet-nat-server.c @@ -55,11 +55,9 @@ try_anat (uint32_t dst_ipv4, uint16_t dport, int is_tcp) struct GNUNET_NAT_Handle *h; struct sockaddr_in sa; -#if DEBUG_NAT GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Asking for connection reversal with %x and code %u\n", (unsigned int) dst_ipv4, (unsigned int) dport); -#endif h = GNUNET_NAT_register (cfg, is_tcp, dport, 0, NULL, NULL, NULL, NULL, NULL); memset (&sa, 0, sizeof (sa)); sa.sin_family = AF_INET; @@ -107,9 +105,7 @@ tcp_send (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) if (-1 == GNUNET_NETWORK_socket_send (ctx->s, &ctx->data, sizeof (ctx->data))) { -#if DEBUG_NAT GNUNET_log_strerror (GNUNET_ERROR_TYPE_DEBUG, "send"); -#endif } GNUNET_NETWORK_socket_shutdown (ctx->s, SHUT_RDWR); } @@ -146,10 +142,8 @@ try_send_tcp (uint32_t dst_ipv4, uint16_t dport, uint16_t data) #endif sa.sin_addr.s_addr = dst_ipv4; sa.sin_port = htons (dport); -#if DEBUG_NAT GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending TCP message to `%s'\n", GNUNET_a2s ((struct sockaddr *) &sa, sizeof (sa))); -#endif if ((GNUNET_OK != GNUNET_NETWORK_socket_connect (s, (const struct sockaddr *) &sa, sizeof (sa))) && (errno != EINPROGRESS)) @@ -192,10 +186,8 @@ try_send_udp (uint32_t dst_ipv4, uint16_t dport, uint16_t data) #endif sa.sin_addr.s_addr = dst_ipv4; sa.sin_port = htons (dport); -#if DEBUG_NAT GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending UDP packet to `%s'\n", GNUNET_a2s ((struct sockaddr *) &sa, sizeof (sa))); -#endif if (-1 == GNUNET_NETWORK_socket_sendto (s, &data, sizeof (data), (const struct sockaddr *) &sa, sizeof (sa))) @@ -219,9 +211,7 @@ test (void *cls, struct GNUNET_SERVER_Client *client, const struct GNUNET_NAT_TestMessage *tm; uint16_t dport; -#if DEBUG_NAT GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received test request\n"); -#endif tm = (const struct GNUNET_NAT_TestMessage *) msg; dport = ntohs (tm->dport); if (0 == dport) |