aboutsummaryrefslogtreecommitdiff
path: root/mp_pub.c
diff options
context:
space:
mode:
authorMarkus Teich <markus.teich@stusta.mhn.de>2016-12-02 09:34:25 +0100
committerMarkus Teich <markus.teich@stusta.mhn.de>2016-12-02 09:34:25 +0100
commit56b43dab7ff80acc4cd0e7ad3057abd5e6bad680 (patch)
tree74b6a5f1ff6f8994582926112b4102574784f524 /mp_pub.c
parentaee7167739e666ea94c3b68c58a0f7aa1ede238e (diff)
migrate to GNUNET_log
Diffstat (limited to 'mp_pub.c')
-rw-r--r--mp_pub.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/mp_pub.c b/mp_pub.c
index 7c2a373..68705cf 100644
--- a/mp_pub.c
+++ b/mp_pub.c
@@ -267,7 +267,9 @@ mp_pub_recv_outcome (struct BRANDT_Auction *ad,
if (buflen != (ad->k * (2 * sizeof (struct ec_mpi) + sizeof (*proof2))))
{
- weprintf ("wrong size of received outcome");
+ GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR,
+ "libbrandt",
+ "wrong size of received outcome\n");
goto quit;
}
@@ -282,7 +284,9 @@ mp_pub_recv_outcome (struct BRANDT_Auction *ad,
ad->delta3[sender][0][j],
proof2))
{
- weprintf ("wrong zkp2 for gamma, delta received");
+ GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR,
+ "libbrandt",
+ "wrong zkp2 for gamma, delta received\n");
goto quit;
}
ec_point_copy (ad->gamma3[sender][0][j], gamma);
@@ -411,7 +415,9 @@ mp_pub_recv_decryption (struct BRANDT_Auction *ad,
if (buflen != (2 * ad->k * (sizeof (struct ec_mpi) + sizeof (*proof2))))
{
- weprintf ("wrong size of received outcome decryption");
+ GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING,
+ "libbrandt",
+ "wrong size of received outcome decryption\n");
goto quit;
}
@@ -429,7 +435,9 @@ mp_pub_recv_decryption (struct BRANDT_Auction *ad,
ec_gen,
proof2))
{
- weprintf ("wrong zkp2 for phi, y received");
+ GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING,
+ "libbrandt",
+ "wrong zkp2 for phi, y received\n");
goto quit;
}
ec_point_copy (ad->phi3[sender][comp][j], phi);
@@ -496,7 +504,9 @@ mp_pub_determine_outcome (struct BRANDT_Auction *ad,
{
if (cur_winner >= ad->m)
{
- weprintf ("too many winners detected");
+ GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR,
+ "libbrandt",
+ "too many winners detected\n");
GNUNET_free (ret);
ret = NULL;
goto quit;
@@ -511,7 +521,9 @@ mp_pub_determine_outcome (struct BRANDT_Auction *ad,
if (cur_winner != ad->m)
{
- weprintf ("too few winners detected");
+ GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR,
+ "libbrandt",
+ "too few winners detected\n");
GNUNET_free (ret);
ret = NULL;
goto quit;