- {
- add_peer (i);
- ic[i] = GNUNET_PEERINFO_iterate (h,
- NULL,
- GNUNET_TIME_relative_multiply
- (GNUNET_TIME_UNIT_SECONDS, 30),
- &process, cls);
- }
-}
-
-static int
-check ()
-{
- int ok = 0;
- char *const argv[] = { "test-peerinfo-hammer",
- "-c",
- "test_peerinfo_api_data.conf",
-#if DEBUG_PEERINFO
- "-L", "DEBUG",
-#endif
- NULL
- };
-#if START_SERVICE
- GNUNET_OS_Process *proc;
- struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_END
- };
- proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-peerinfo",
- "gnunet-service-peerinfo",
-#if DEBUG_PEERINFO
- "-L", "DEBUG",
-#endif
- "-c", "test_peerinfo_api_data.conf", NULL);
-#endif
- GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1,
- argv, "perf-peerinfo-api", "nohelp",
- options, &run, &ok);
- fprintf (stderr,
- "Received %u/%u calls before timeout\n",
- numpeers,
- NUM_REQUESTS * NUM_REQUESTS / 2);
-#if START_SERVICE
- if (0 != GNUNET_OS_process_kill (proc, SIGTERM))
- {
- GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
- ok = 1;
- }
- GNUNET_OS_process_wait (proc);
- GNUNET_OS_process_close (proc);
- proc = NULL;
-
-#endif
- return ok;
+ {
+ add_peer (i);
+ ic[i] =
+ GNUNET_PEERINFO_iterate (h, NULL,
+ GNUNET_TIME_relative_multiply
+ (GNUNET_TIME_UNIT_SECONDS, 30), &process, cls);
+ }