#include "gnunet_ats_service.h"
#include "ats.h"
-#define VERBOSE GNUNET_EXTRA_LOGGING
-
-#define VERBOSE_ARM GNUNET_EXTRA_LOGGING
-
#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10)
static GNUNET_SCHEDULER_TaskIdentifier die_task;
if (0 != GNUNET_OS_process_kill (arm_proc, SIGTERM))
GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
GNUNET_OS_process_wait (arm_proc);
- GNUNET_OS_process_close (arm_proc);
+ GNUNET_OS_process_destroy (arm_proc);
arm_proc = NULL;
}
static void
-address_suggest_cb (void *cls,
- const struct GNUNET_HELLO_Address *address,
+address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
struct Session *session,
struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
GNUNET_i2s (&address->peer));
GNUNET_assert (0 ==
- memcmp (&address->peer, &p[0].id, sizeof (struct GNUNET_PeerIdentity)));
+ memcmp (&address->peer, &p[0].id,
+ sizeof (struct GNUNET_PeerIdentity)));
GNUNET_assert (0 == strcmp (address->transport_name, addr[0].plugin));
GNUNET_assert (address->address_length == addr[0].addr_len);
- GNUNET_assert (0 == memcmp (address->address, addr[0].plugin, address->address_length));
+ GNUNET_assert (0 ==
+ memcmp (address->address, addr[0].plugin,
+ address->address_length));
GNUNET_assert (addr[0].session == session);
start_arm (const char *cfgname)
{
arm_proc =
- GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm",
+ GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-service-arm",
"gnunet-service-arm",
-#if VERBOSE_ARM
- "-L", "DEBUG",
-#endif
"-c", cfgname, NULL);
}
GNUNET_ATS_address_update (ats, &address0, addr[0].session, atsi, 2);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Testing manual address deletion \n");
- address0.peer = p[1].id; // FIXME: why? typo in old code?
+ address0.peer = p[1].id; // FIXME: why? typo in old code?
GNUNET_ATS_address_update (ats, &address0, addr[0].session, NULL, 0);
GNUNET_ATS_address_destroyed (ats, &address0, addr[0].session);
static char *const argv2[] = { "test_ats_api_scheduling",
"-c",
"test_ats_api.conf",
-#if VERBOSE
- "-L", "DEBUG",
-#else
"-L", "WARNING",
-#endif
NULL
};