GNUNET_HashCode key;
int i;
int found;
- struct GNUNET_SCHEDULER_Handle *sched;
const struct GNUNET_CONFIGURATION_Handle *cfg;
void *data;
enum RunPhase phase;
GNUNET_assert (GNUNET_OK == success);
GNUNET_free_non_null (crc->data);
crc->data = NULL;
- GNUNET_SCHEDULER_add_continuation (crc->sched,
- &run_continuation,
+ GNUNET_SCHEDULER_add_continuation (&run_continuation,
crc,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
}
}
if (0 == crc->i)
crc->phase = RP_DONE;
- GNUNET_SCHEDULER_add_continuation (crc->sched,
- &run_continuation,
+ GNUNET_SCHEDULER_add_continuation (&run_continuation,
crc,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
return;
GNUNET_assert (key == NULL);
if (0 == --crc->i)
crc->phase = RP_DONE;
- GNUNET_SCHEDULER_add_continuation (crc->sched,
- &run_continuation,
+ GNUNET_SCHEDULER_add_continuation (&run_continuation,
crc,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
}
GNUNET_free (crc);
return;
}
- GNUNET_SCHEDULER_add_continuation (crc->sched,
- &run_continuation,
+ GNUNET_SCHEDULER_add_continuation (&run_continuation,
crc,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
}
static void
run (void *cls,
- struct GNUNET_SCHEDULER_Handle *sched,
char *const *args,
const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
static GNUNET_HashCode zkey;
crc = GNUNET_malloc(sizeof(struct CpsRunContext));
- crc->sched = sched;
crc->cfg = cfg;
crc->phase = RP_PUT;
now = GNUNET_TIME_absolute_get ();
- datastore = GNUNET_DATASTORE_connect (cfg, sched);
+ datastore = GNUNET_DATASTORE_connect (cfg);
if (NULL ==
GNUNET_DATASTORE_put (datastore, 0,
&zkey, 4, "TEST",
static int
check ()
{
- pid_t pid;
+ struct GNUNET_OS_Process *proc;
char cfg_name[128];
char *const argv[] = {
"test-datastore-api-management",
sizeof (cfg_name),
"test_datastore_api_data_%s.conf",
plugin_name);
- pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm",
+ proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm",
"gnunet-service-arm",
#if VERBOSE
"-L", "DEBUG",
GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1,
argv, "test-datastore-api", "nohelp",
options, &run, NULL);
- if (0 != PLIBC_KILL (pid, SIGTERM))
+ if (0 != GNUNET_OS_process_kill (proc, SIGTERM))
{
GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
ok = 1;
}
- GNUNET_OS_process_wait(pid);
+ GNUNET_OS_process_wait (proc);
+ GNUNET_OS_process_close (proc);
+ proc = NULL;
if (ok != 0)
fprintf (stderr, "Missed some testcases: %u\n", ok);
return ok;