struct ctdb_db_context *ctdb_db;
int num_nodes;
int timelimit;
+ int interactive;
TDB_DATA key;
int msg_count;
struct timeval start_time;
struct tevent_context *ev,
struct ctdb_client_context *client,
struct ctdb_db_context *ctdb_db,
- int num_nodes, int timelimit)
+ int num_nodes, int timelimit,
+ int interactive)
{
struct tevent_req *req, *subreq;
struct fetch_ring_state *state;
state->ctdb_db = ctdb_db;
state->num_nodes = num_nodes;
state->timelimit = timelimit;
+ state->interactive = interactive;
state->key.dptr = discard_const(TESTKEY);
state->key.dsize = strlen(TESTKEY);
return;
}
- printf("DATA:\n%s\n", (char *)data.dptr);
+ if (state->interactive == 1) {
+ printf("DATA:\n%s\n", (char *)data.dptr);
+ }
talloc_free(data.dptr);
talloc_free(h);
}
req = fetch_ring_send(mem_ctx, ev, client, ctdb_db,
- opts->num_nodes, opts->timelimit);
+ opts->num_nodes, opts->timelimit,
+ opts->interactive);
if (req == NULL) {
fprintf(stderr, "Memory allocation error\n");
exit(1);