-improve indentation, reduce duplication of PIDs in core's neighbour map
[oweals/gnunet.git] / src / nat / nat_auto.c
index 8fc85d7a716126fbdda7a17a5913b6cdef0f04d5..327970e0afae473c807360fca28832eaf838f2fe 100644 (file)
@@ -1,6 +1,6 @@
 /*
      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
@@ -14,8 +14,8 @@
 
      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.
 */
 
 /**
@@ -129,7 +129,7 @@ struct GNUNET_NAT_AutoHandle
   /**
    * Task identifier for the timeout.
    */
-  GNUNET_SCHEDULER_TaskIdentifier task;
+  struct GNUNET_SCHEDULER_Task * task;
 
   /**
    * Where are we in the test?
@@ -196,7 +196,7 @@ reversal_test (void *cls,
 {
   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);
@@ -603,10 +603,10 @@ GNUNET_NAT_autoconfig_cancel (struct GNUNET_NAT_AutoHandle *ah)
     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);