use -Wl on -no-undefined as it is a linker option:
[oweals/gnunet.git] / src / ats / test_ats_api_common.c
index f8d106a7f58434ffa534a3b34f76483cef1abcfe..934877024b409b47e4c5baa8c456cd9b95ac3b31 100644 (file)
  */
 
 #include "test_ats_api_common.h"
-
-#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30)
 #define BIG_M_STRING "unlimited"
 
 
-#define PEERID0 "2AK99KD8RM9UA9LC3QKA0IQ5UBFC0FBB50EBGCFQT8448DGGACNAC4CJQDD1CPFS494O41U88DJD1FLIG8VA5CQR9IN4L96GP104MVO"
-#define PEERID1 "5ED7I0AR3MSTAL7FQN04S22E0EQ3CR9RLASCDLVMM1BNFPUPTCT46DLKNJ4DACASJ6U0DR5J8S3R2UJL49682JS7MOVRAB8P8A4PJH0"
-
 void
 create_test_address (struct Test_Address *dest, char * plugin, void *session, void *addr, size_t addrlen)
 {
@@ -52,9 +47,10 @@ create_test_address (struct Test_Address *dest, char * plugin, void *session, vo
 void
 free_test_address (struct Test_Address *dest)
 {
-  GNUNET_free (dest->plugin);
-  if (NULL != dest->addr)
-    GNUNET_free (dest->addr);
+  GNUNET_free_non_null (dest->plugin);
+  dest->plugin = NULL;
+  GNUNET_free_non_null (dest->addr);
+  dest->addr = NULL;
 }
 
 int
@@ -73,13 +69,13 @@ compare_addresses (const struct GNUNET_HELLO_Address *address1, void *session1,
   }
   if (address1->address_length != address2->address_length)
   {
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Suggestion with invalid address length'\n");
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Suggestion with invalid address length\n");
       return GNUNET_SYSERR;
 
   }
   else if (0 != memcmp (address1->address, address2->address, address2->address_length))
   {
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Suggestion with invalid address'\n");
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Suggestion with invalid address\n");
       return GNUNET_SYSERR;
   }
   if (session1 != session2)
@@ -190,7 +186,7 @@ load_quotas (const struct GNUNET_CONFIGURATION_Handle *cfg,
       }
       else
       {
-          GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Outbound quota configure for network `%s' is %llu\n"),
+          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, _("Outbound quota configure for network `%s' is %llu\n"),
               network_str[c], out_dest[c]);
       }
       GNUNET_free (quota_out_str);
@@ -224,7 +220,7 @@ load_quotas (const struct GNUNET_CONFIGURATION_Handle *cfg,
       }
       else
       {
-          GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Inbound quota configured for network `%s' is %llu\n"),
+          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, _("Inbound quota configured for network `%s' is %llu\n"),
               network_str[c], in_dest[c]);
       }
       GNUNET_free (quota_in_str);