}
-
-
/**
* Stats callback. Finish the stats testbed operation and when all stats have
* been iterated, shutdown the test.
const char *subsystem, const char *name,
uint64_t value, int is_persistent)
{
+ static const char *s_sent = "# keepalives sent";
+ static const char *s_recv = "# keepalives received";
+ uint32_t i;
+
+ i = GNUNET_TESTBED_get_index (peer);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " %u - %s [%s]: %llu\n",
- cls, subsystem, name, value);
- if (0 == strncmp("# keepalives sent", name,
- strlen("# keepalives sent"))
- && 0 == (long) cls)
+ i, subsystem, name, value);
+ if (0 == strncmp (s_sent, name, strlen (s_sent)) && 0 == i)
ka_sent = value;
- if (0 == strncmp("# keepalives received", name,
- strlen ("# keepalives received"))
- && 4 == (long) cls)
+ if (0 == strncmp(s_recv, name, strlen (s_recv)) && 4 == i)
{
ka_received = value;
GNUNET_log (GNUNET_ERROR_TYPE_INFO, " sent: %u, received: %u\n",
main (int argc, char *argv[])
{
initialized = GNUNET_NO;
- uint32_t ports[2];
+ static uint32_t ports[2];
const char *config_file;
GNUNET_log_setup ("test", "DEBUG", NULL);