diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-10-31 22:46:28 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-10-31 22:46:28 +0000 |
commit | 45ecb8fc02474aaadbc6a417c477d9ba0780b5c7 (patch) | |
tree | 8314e97abe92d3d1211417056b3f1132abf4dbad /src/nat | |
parent | 7facc075b01bc6d3ffbb2bb96a9170bac605879b (diff) | |
download | gnunet-45ecb8fc02474aaadbc6a417c477d9ba0780b5c7.tar.gz gnunet-45ecb8fc02474aaadbc6a417c477d9ba0780b5c7.zip |
-better logging in NAT
Diffstat (limited to 'src/nat')
-rw-r--r-- | src/nat/nat_mini.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nat/nat_mini.c b/src/nat/nat_mini.c index 5dffa8120..fbb6e769a 100644 --- a/src/nat/nat_mini.c +++ b/src/nat/nat_mini.c | |||
@@ -165,7 +165,13 @@ GNUNET_NAT_mini_get_external_ipv4 (struct GNUNET_TIME_Relative timeout, | |||
165 | struct GNUNET_NAT_ExternalHandle *eh; | 165 | struct GNUNET_NAT_ExternalHandle *eh; |
166 | 166 | ||
167 | if (GNUNET_SYSERR == GNUNET_OS_check_helper_binary ("external-ip")) | 167 | if (GNUNET_SYSERR == GNUNET_OS_check_helper_binary ("external-ip")) |
168 | { | ||
169 | LOG (GNUNET_ERROR_TYPE_INFO, | ||
170 | _("`external-ip' command not found\n")); | ||
168 | return NULL; | 171 | return NULL; |
172 | } | ||
173 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
174 | "Running `external-ip' to determine our external IP\n"); | ||
169 | eh = GNUNET_malloc (sizeof (struct GNUNET_NAT_ExternalHandle)); | 175 | eh = GNUNET_malloc (sizeof (struct GNUNET_NAT_ExternalHandle)); |
170 | eh->cb = cb; | 176 | eh->cb = cb; |
171 | eh->cb_cls = cb_cls; | 177 | eh->cb_cls = cb_cls; |
@@ -408,6 +414,8 @@ do_refresh (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
408 | { | 414 | { |
409 | struct GNUNET_NAT_MiniHandle *mini = cls; | 415 | struct GNUNET_NAT_MiniHandle *mini = cls; |
410 | 416 | ||
417 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
418 | "Running `upnpc' to check if our mapping still exists\n"); | ||
411 | mini->refresh_task = GNUNET_SCHEDULER_NO_TASK; | 419 | mini->refresh_task = GNUNET_SCHEDULER_NO_TASK; |
412 | mini->found = GNUNET_NO; | 420 | mini->found = GNUNET_NO; |
413 | mini->refresh_cmd = | 421 | mini->refresh_cmd = |
@@ -492,7 +500,13 @@ GNUNET_NAT_mini_map_start (uint16_t port, int is_tcp, | |||
492 | char pstr[6]; | 500 | char pstr[6]; |
493 | 501 | ||
494 | if (GNUNET_SYSERR == GNUNET_OS_check_helper_binary ("upnpc")) | 502 | if (GNUNET_SYSERR == GNUNET_OS_check_helper_binary ("upnpc")) |
503 | { | ||
504 | LOG (GNUNET_ERROR_TYPE_INFO, | ||
505 | _("`upnpc' command not found\n")); | ||
495 | return NULL; | 506 | return NULL; |
507 | } | ||
508 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
509 | "Running `upnpc' to install mapping\n"); | ||
496 | ret = GNUNET_malloc (sizeof (struct GNUNET_NAT_MiniHandle)); | 510 | ret = GNUNET_malloc (sizeof (struct GNUNET_NAT_MiniHandle)); |
497 | ret->ac = ac; | 511 | ret->ac = ac; |
498 | ret->ac_cls = ac_cls; | 512 | ret->ac_cls = ac_cls; |