struct CpsRunContext
{
- struct GNUNET_SCHEDULER_Handle *sched;
const struct GNUNET_CONFIGURATION_Handle *cfg;
enum RunPhase phase;
int j;
else
crc->phase = RP_CUT;
}
- GNUNET_SCHEDULER_add_continuation (crc->sched,
- &run_continuation,
+ GNUNET_SCHEDULER_add_continuation (&run_continuation,
crc,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
}
fprintf (stderr, "D");
#endif
GNUNET_assert (GNUNET_OK == success);
- GNUNET_SCHEDULER_add_continuation (crc->sched,
- &run_continuation,
+ GNUNET_SCHEDULER_add_continuation (&run_continuation,
crc,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
}
if (stored_bytes < MAX_SIZE)
{
crc->phase = RP_REPORT;
- GNUNET_SCHEDULER_add_continuation (crc->sched,
- &run_continuation,
+ GNUNET_SCHEDULER_add_continuation (&run_continuation,
crc,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
return;
}
- GNUNET_SCHEDULER_add_with_priority (crc->sched,
- GNUNET_SCHEDULER_PRIORITY_HIGH,
+ GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_HIGH,
&do_delete,
crc);
return;
1000 * stored_ops / (1 + GNUNET_TIME_absolute_get_duration(start_time).rel_value));
crc->phase = RP_PUT;
crc->j = 0;
- GNUNET_SCHEDULER_add_continuation (crc->sched,
- &run_continuation,
+ GNUNET_SCHEDULER_add_continuation (&run_continuation,
crc,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
break;
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)
struct CpsRunContext *crc;
static GNUNET_HashCode zkey;
- datastore = GNUNET_DATASTORE_connect (cfg, sched);
+ datastore = GNUNET_DATASTORE_connect (cfg);
start_time = GNUNET_TIME_absolute_get ();
crc = GNUNET_malloc(sizeof(struct CpsRunContext));
- crc->sched = sched;
crc->cfg = cfg;
crc->phase = RP_PUT;
if (NULL ==
main (int argc, char *argv[])
{
int ret;
- const char *pos;
+ char *pos;
char dir_name[128];
/* determine name of plugin to use */
plugin_name = argv[0];
while (NULL != (pos = strstr(plugin_name, "_")))
plugin_name = pos+1;
+ if (NULL != (pos = strstr(plugin_name, ".")))
+ pos[0] = 0;
+ else
+ pos = (char *) plugin_name;
GNUNET_snprintf (dir_name,
sizeof (dir_name),
#endif
NULL);
ret = check ();
+ if (pos != plugin_name)
+ pos[0] = '.';
#if REPORT_ID
fprintf (stderr, "\n");
#endif