From 56b43dab7ff80acc4cd0e7ad3057abd5e6bad680 Mon Sep 17 00:00:00 2001 From: Markus Teich Date: Fri, 2 Dec 2016 09:34:25 +0100 Subject: migrate to GNUNET_log --- mp_pub.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'mp_pub.c') 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; -- cgit v1.2.3