diff options
Diffstat (limited to 'brandt.c')
-rw-r--r-- | brandt.c | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -50,12 +50,25 @@ BRANDT_init (struct GNUNET_CRYPTO_EccDlogContext *dlogctx) } +BRANDT_start (struct BRANDT_Auction *auction, + uint16_t n){ + GNUNET_assert (n > 0); + auction->n = n; + /** \todo: send first message */ +} + + static void start_auction (void *arg) { -// struct BRANDT_Auction *ad = (struct BRANDT_Auction *)arg; + struct BRANDT_Auction *ad = (struct BRANDT_Auction *)arg; - /* \todo: broadcast start message to all participants */ + if (0 == (ad->n = ad->start (ad->closure))) + { + weprintf ("no bidders registered for auction"); + ad->result (ad->closure, -1, result_no_bidders, 0); + return; + } } |