aboutsummaryrefslogtreecommitdiff
path: root/brandt.c
diff options
context:
space:
mode:
authorMarkus Teich <markus.teich@stusta.mhn.de>2016-08-17 23:53:49 +0200
committerMarkus Teich <markus.teich@stusta.mhn.de>2016-08-17 23:53:49 +0200
commit25321ed0f5fa06f7c25d9e571c27c8dbeb5ffb96 (patch)
treec9ba7f1466ba4fd1a5185452b1b606f7cb52f00c /brandt.c
parent8daaa565bd5cfa5806296ef25efc2f5ee41af5bf (diff)
get auctions rolling
Diffstat (limited to 'brandt.c')
-rw-r--r--brandt.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/brandt.c b/brandt.c
index e90ec2f..edfca62 100644
--- a/brandt.c
+++ b/brandt.c
@@ -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;
+ }
}