aboutsummaryrefslogtreecommitdiff
path: root/src/nat/nat_mini.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-10 13:57:17 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-10 13:57:17 +0000
commit64f93505159d734411000a3097650e8d472c1d9b (patch)
treeb943c59c47cc3935b3c8e377221fe3a79f709dcd /src/nat/nat_mini.c
parent2d32b2ca9b0497490e4215a2c15d236b16a77f19 (diff)
downloadgnunet-64f93505159d734411000a3097650e8d472c1d9b.tar.gz
gnunet-64f93505159d734411000a3097650e8d472c1d9b.zip
use LOG macro in nat.c
Diffstat (limited to 'src/nat/nat_mini.c')
-rw-r--r--src/nat/nat_mini.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/nat/nat_mini.c b/src/nat/nat_mini.c
index 8014a451d..5a83d7a4f 100644
--- a/src/nat/nat_mini.c
+++ b/src/nat/nat_mini.c
@@ -28,6 +28,7 @@
28#include "gnunet_nat_lib.h" 28#include "gnunet_nat_lib.h"
29#include "nat.h" 29#include "nat.h"
30 30
31#define LOG(kind,...) GNUNET_log_from (kind, "nat", __VA_ARGS__)
31 32
32/** 33/**
33 * How long do we give upnpc to create a mapping? 34 * How long do we give upnpc to create a mapping?
@@ -163,8 +164,7 @@ GNUNET_NAT_mini_get_external_ipv4 (struct GNUNET_TIME_Relative timeout,
163{ 164{
164 struct GNUNET_NAT_ExternalHandle *eh; 165 struct GNUNET_NAT_ExternalHandle *eh;
165 166
166 if (GNUNET_SYSERR == 167 if (GNUNET_SYSERR == GNUNET_OS_check_helper_binary ("external-ip"))
167 GNUNET_OS_check_helper_binary ("external-ip"))
168 return NULL; 168 return NULL;
169 eh = GNUNET_malloc (sizeof (struct GNUNET_NAT_ExternalHandle)); 169 eh = GNUNET_malloc (sizeof (struct GNUNET_NAT_ExternalHandle));
170 eh->cb = cb; 170 eh->cb = cb;
@@ -525,7 +525,7 @@ process_unmap_output (void *cls, const char *line)
525 if (NULL == line) 525 if (NULL == line)
526 { 526 {
527#if DEBUG_NAT 527#if DEBUG_NAT
528 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "nat", "UPnP unmap done\n"); 528 LOG (GNUNET_ERROR_TYPE_DEBUG, "UPnP unmap done\n");
529#endif 529#endif
530 GNUNET_OS_command_stop (mini->unmap_cmd); 530 GNUNET_OS_command_stop (mini->unmap_cmd);
531 mini->unmap_cmd = NULL; 531 mini->unmap_cmd = NULL;
@@ -578,9 +578,8 @@ GNUNET_NAT_mini_map_stop (struct GNUNET_NAT_MiniHandle *mini)
578 GNUNET_snprintf (pstr, sizeof (pstr), "%u", 578 GNUNET_snprintf (pstr, sizeof (pstr), "%u",
579 (unsigned int) ntohs (mini->current_addr.sin_port)); 579 (unsigned int) ntohs (mini->current_addr.sin_port));
580#if DEBUG_NAT 580#if DEBUG_NAT
581 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "nat", 581 LOG (GNUNET_ERROR_TYPE_DEBUG, "Unmapping port %u with UPnP\n",
582 "Unmapping port %u with UPnP\n", 582 ntohs (mini->current_addr.sin_port));
583 ntohs (mini->current_addr.sin_port));
584#endif 583#endif
585 mini->unmap_cmd = 584 mini->unmap_cmd =
586 GNUNET_OS_command_run (&process_unmap_output, mini, UNMAP_TIMEOUT, 585 GNUNET_OS_command_run (&process_unmap_output, mini, UNMAP_TIMEOUT,