diff options
author | Markus Teich <markus.teich@stusta.mhn.de> | 2016-08-17 17:37:56 +0200 |
---|---|---|
committer | Markus Teich <markus.teich@stusta.mhn.de> | 2016-08-17 17:37:56 +0200 |
commit | ec43082b1adfa394184900d49f5fe816dba749ec (patch) | |
tree | 2c542044512484a9a29e15d1cfb9c3fef7129cb6 /brandt.c | |
parent | 6eb35ae72f4e579bd094f630b6b9d3d042432ae3 (diff) |
add start callback and further basic tests
Diffstat (limited to 'brandt.c')
-rw-r--r-- | brandt.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -60,8 +60,9 @@ start_auction (void *arg) struct BRANDT_Auction * -BRANDT_new (BRANDT_CbBroadcast broadcast, - BRANDT_CbResult result, +BRANDT_new (BRANDT_CbResult result, + BRANDT_CbBroadcast broadcast, + BRANDT_CbStart start, void *auction_closure, void **auction_desc, size_t *auction_desc_len, @@ -97,7 +98,7 @@ BRANDT_new (BRANDT_CbBroadcast broadcast, ret->k = num_prices; ret->m = m; ret->outcome_public = outcome_public; - ret->cur_round = msg_join; + ret->cur_round = msg_init; ret->round_progress = gcry_mpi_new (256); /* we are the seller */ @@ -107,9 +108,9 @@ BRANDT_new (BRANDT_CbBroadcast broadcast, ret->closure = auction_closure; ret->bcast = broadcast; ret->result = result; + ret->start = start; until_start = GNUNET_TIME_absolute_get_remaining (time_start); - /* \todo: store returned task somewhere to cancel it on shutdown */ ret->task = GNUNET_SCHEDULER_add_delayed (until_start, &start_auction, ret); @@ -178,9 +179,9 @@ BRANDT_verify_desc (const void *auction_desc, struct BRANDT_Auction * -BRANDT_join (BRANDT_CbBroadcast broadcast, +BRANDT_join (BRANDT_CbResult result, + BRANDT_CbBroadcast broadcast, BRANDT_CbUnicast unicast, - BRANDT_CbResult result, void *auction_closure, const void *auction_desc, size_t auction_desc_len, @@ -202,7 +203,7 @@ BRANDT_join (BRANDT_CbBroadcast broadcast, weprintf ("failed to parse auction description blob"); return NULL; } - ret->cur_round = msg_join; + ret->cur_round = msg_init; ret->round_progress = gcry_mpi_new (256); /* we are the seller */ |