/*
This file is part of GNUnet.
- (C) 2012 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2012 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
/**
* Task identifier for the timeout.
*/
- GNUNET_SCHEDULER_TaskIdentifier task;
+ struct GNUNET_SCHEDULER_Task * task;
/**
* Where are we in the test?
/**
* Error code for better debugging and user feedback
*/
- enum GNUNET_NAT_FailureCode ret;
+ enum GNUNET_NAT_StatusCode ret;
};
*/
static void
result_callback (void *cls,
- enum GNUNET_NAT_FailureCode ret)
+ enum GNUNET_NAT_StatusCode ret)
{
struct GNUNET_NAT_AutoHandle *ah = cls;
- GNUNET_NAT_test_stop (ah->tst);
+ if (GNUNET_NAT_ERROR_SUCCESS == ret)
+ GNUNET_NAT_test_stop (ah->tst);
ah->tst = NULL;
ah->ret = ret;
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
{
struct GNUNET_NAT_AutoHandle *ah = cls;
- ah->task = GNUNET_SCHEDULER_NO_TASK;
+ ah->task = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("Testing connection reversal with ICMP server.\n"));
GNUNET_RESOLVER_connect (ah->cfg);
static void
set_external_ipv4 (void *cls,
const struct in_addr *addr,
- enum GNUNET_NAT_FailureCode ret)
+ enum GNUNET_NAT_StatusCode ret)
{
struct GNUNET_NAT_AutoHandle *ah = cls;
char buf[INET_ADDRSTRLEN];
GNUNET_NAT_mini_get_external_ipv4_cancel (ah->eh);
ah->eh = NULL;
}
- if (GNUNET_SCHEDULER_NO_TASK != ah->task)
+ if (NULL != ah->task)
{
GNUNET_SCHEDULER_cancel (ah->task);
- ah->task = GNUNET_SCHEDULER_NO_TASK;
+ ah->task = NULL;
}
GNUNET_CONFIGURATION_destroy (ah->cfg);
GNUNET_CONFIGURATION_destroy (ah->initial_cfg);