aboutsummaryrefslogtreecommitdiff
path: root/brandt.c
diff options
context:
space:
mode:
Diffstat (limited to 'brandt.c')
-rw-r--r--brandt.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/brandt.c b/brandt.c
index 03337c4..e90ec2f 100644
--- a/brandt.c
+++ b/brandt.c
@@ -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 */