aboutsummaryrefslogtreecommitdiff
path: root/src/nat/nat_mini.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-07-11 14:49:46 +0000
committerChristian Grothoff <christian@grothoff.org>2011-07-11 14:49:46 +0000
commit8dc32abbeff6b4b348253afed6c60543665a34c2 (patch)
tree0fe942debb1a57fcfef9d3526aab7217377b101a /src/nat/nat_mini.c
parentc7c9e6915281826e3027bc215ddffb14c2a72e47 (diff)
downloadgnunet-8dc32abbeff6b4b348253afed6c60543665a34c2.tar.gz
gnunet-8dc32abbeff6b4b348253afed6c60543665a34c2.zip
logging
Diffstat (limited to 'src/nat/nat_mini.c')
-rw-r--r--src/nat/nat_mini.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/nat/nat_mini.c b/src/nat/nat_mini.c
index c8ac65edb..b82866c78 100644
--- a/src/nat/nat_mini.c
+++ b/src/nat/nat_mini.c
@@ -28,6 +28,8 @@
28#include "gnunet_nat_lib.h" 28#include "gnunet_nat_lib.h"
29#include "nat.h" 29#include "nat.h"
30 30
31#define DEBUG_NAT GNUNET_NO
32
31/** 33/**
32 * How long do we give upnpc to create a mapping? 34 * How long do we give upnpc to create a mapping?
33 */ 35 */
@@ -453,8 +455,11 @@ process_unmap_output (void *cls,
453 455
454 if (NULL == line) 456 if (NULL == line)
455 { 457 {
456 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 458#if DEBUG_NAT
457 "UPnP unmap done\n"); 459 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG,
460 "nat",
461 "UPnP unmap done\n");
462#endif
458 GNUNET_OS_command_stop (mini->unmap_cmd); 463 GNUNET_OS_command_stop (mini->unmap_cmd);
459 mini->unmap_cmd = NULL; 464 mini->unmap_cmd = NULL;
460 GNUNET_free (mini); 465 GNUNET_free (mini);
@@ -506,9 +511,12 @@ GNUNET_NAT_mini_map_stop (struct GNUNET_NAT_MiniHandle *mini)
506 GNUNET_snprintf (pstr, sizeof (pstr), 511 GNUNET_snprintf (pstr, sizeof (pstr),
507 "%u", 512 "%u",
508 (unsigned int) ntohs (mini->current_addr.sin_port)); 513 (unsigned int) ntohs (mini->current_addr.sin_port));
509 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 514#if DEBUG_NAT
510 "Unmapping port %u\n", 515 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG,
511 ntohs (mini->current_addr.sin_port)); 516 "nat",
517 "Unmapping port %u with UPnP\n",
518 ntohs (mini->current_addr.sin_port));
519#endif
512 mini->unmap_cmd = GNUNET_OS_command_run (&process_unmap_output, 520 mini->unmap_cmd = GNUNET_OS_command_run (&process_unmap_output,
513 mini, 521 mini,
514 UNMAP_TIMEOUT, 522 UNMAP_TIMEOUT,