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) | |||
50 | } | 50 | } |
51 | 51 | ||
52 | 52 | ||
53 | BRANDT_start (struct BRANDT_Auction *auction, | ||
54 | uint16_t n){ | ||
55 | GNUNET_assert (n > 0); | ||
56 | auction->n = n; | ||
57 | /** \todo: send first message */ | ||
58 | } | ||
59 | |||
60 | |||
53 | static void | 61 | static void |
54 | start_auction (void *arg) | 62 | start_auction (void *arg) |
55 | { | 63 | { |
56 | // struct BRANDT_Auction *ad = (struct BRANDT_Auction *)arg; | 64 | struct BRANDT_Auction *ad = (struct BRANDT_Auction *)arg; |
57 | 65 | ||
58 | /* \todo: broadcast start message to all participants */ | 66 | if (0 == (ad->n = ad->start (ad->closure))) |
67 | { | ||
68 | weprintf ("no bidders registered for auction"); | ||
69 | ad->result (ad->closure, -1, result_no_bidders, 0); | ||
70 | return; | ||
71 | } | ||
59 | } | 72 | } |
60 | 73 | ||
61 | 74 | ||