- ic = GNUNET_PEERINFO_iterate (cfg,
- sched,
- NULL,
- 0,
- GNUNET_TIME_relative_multiply
- (GNUNET_TIME_UNIT_SECONDS, 15), &process, cls);
-}
-
-
-static int
-check ()
-{
- int ok = 3;
- pid_t pid;
- char *const argv[] = { "test-peerinfo-api",
- "-c",
- "test_peerinfo_api_data.conf",
-#if DEBUG_PEERINFO
- "-L", "DEBUG",
-#endif
- NULL
- };
- struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_END
- };
- pid = 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);
- GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1,
- argv, "test-peerinfo-api", "nohelp",
- options, &run, &ok);
- if (0 != PLIBC_KILL (pid, SIGTERM))
- {
- GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
- ok = 1;
- }
- GNUNET_OS_process_wait(pid);
- return ok;