aboutsummaryrefslogtreecommitdiff
path: root/src/nat/nat_test.c
diff options
context:
space:
mode:
authorChristian Fuchs <christian.fuchs@cfuchs.net>2014-06-24 10:18:59 +0000
committerChristian Fuchs <christian.fuchs@cfuchs.net>2014-06-24 10:18:59 +0000
commitf24861f1b06362d683841e07bde180f34f738a10 (patch)
tree61e134e99a44ec623a0c71576b892a1d01def2b6 /src/nat/nat_test.c
parent76c3b55cd2589f3376635c9a8f3b0a6f2421ca7a (diff)
downloadgnunet-f24861f1b06362d683841e07bde180f34f738a10.tar.gz
gnunet-f24861f1b06362d683841e07bde180f34f738a10.zip
- added more debug messages to status2string
- added remaining functionality to GNUNET_NAT_test_stop
Diffstat (limited to 'src/nat/nat_test.c')
-rw-r--r--src/nat/nat_test.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nat/nat_test.c b/src/nat/nat_test.c
index 860c51b26..90f06be5c 100644
--- a/src/nat/nat_test.c
+++ b/src/nat/nat_test.c
@@ -406,7 +406,7 @@ do_timeout (void *cls,
406 * @param timeout delay after which the test should be aborted 406 * @param timeout delay after which the test should be aborted
407 * @param report function to call with the result of the test 407 * @param report function to call with the result of the test
408 * @param report_cls closure for @a report 408 * @param report_cls closure for @a report
409 * @return handle to cancel NAT test or NULL. The error is indicated through the report callback 409 * @return handle to cancel NAT test or NULL. The error is always indicated via the report callback
410 */ 410 */
411struct GNUNET_NAT_Test * 411struct GNUNET_NAT_Test *
412GNUNET_NAT_test_start (const struct GNUNET_CONFIGURATION_Handle *cfg, 412GNUNET_NAT_test_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
@@ -489,10 +489,14 @@ GNUNET_NAT_test_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
489 { 489 {
490 LOG (GNUNET_ERROR_TYPE_ERROR, 490 LOG (GNUNET_ERROR_TYPE_ERROR,
491 _("NAT test failed to start NAT library\n")); 491 _("NAT test failed to start NAT library\n"));
492 if (GNUNET_SCHEDULER_NO_TASK != nh->ltask) 492 if (GNUNET_SCHEDULER_NO_TASK != nh->ltask){
493 GNUNET_SCHEDULER_cancel (nh->ltask); 493 GNUNET_SCHEDULER_cancel (nh->ltask);
494 if (NULL != nh->lsock) 494 nh->ltask = GNUNET_SCHEDULER_NO_TASK;
495 }
496 if (NULL != nh->lsock){
495 GNUNET_NETWORK_socket_close (nh->lsock); 497 GNUNET_NETWORK_socket_close (nh->lsock);
498 nh->lsock = NULL;
499 }
496 nh->status = GNUNET_NAT_ERROR_NAT_REGISTER_FAILED; 500 nh->status = GNUNET_NAT_ERROR_NAT_REGISTER_FAILED;
497 nh->ttask = GNUNET_SCHEDULER_add_now (&do_timeout, nh); 501 nh->ttask = GNUNET_SCHEDULER_add_now (&do_timeout, nh);
498 return NULL; 502 return NULL;