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)
downloadlibbrandt-56b43dab7ff80acc4cd0e7ad3057abd5e6bad680.tar.gz
libbrandt-56b43dab7ff80acc4cd0e7ad3057abd5e6bad680.zip
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,
267 267
268 if (buflen != (ad->k * (2 * sizeof (struct ec_mpi) + sizeof (*proof2)))) 268 if (buflen != (ad->k * (2 * sizeof (struct ec_mpi) + sizeof (*proof2))))
269 { 269 {
270 weprintf ("wrong size of received outcome"); 270 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR,
271 "libbrandt",
272 "wrong size of received outcome\n");
271 goto quit; 273 goto quit;
272 } 274 }
273 275
@@ -282,7 +284,9 @@ mp_pub_recv_outcome (struct BRANDT_Auction *ad,
282 ad->delta3[sender][0][j], 284 ad->delta3[sender][0][j],
283 proof2)) 285 proof2))
284 { 286 {
285 weprintf ("wrong zkp2 for gamma, delta received"); 287 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR,
288 "libbrandt",
289 "wrong zkp2 for gamma, delta received\n");
286 goto quit; 290 goto quit;
287 } 291 }
288 ec_point_copy (ad->gamma3[sender][0][j], gamma); 292 ec_point_copy (ad->gamma3[sender][0][j], gamma);
@@ -411,7 +415,9 @@ mp_pub_recv_decryption (struct BRANDT_Auction *ad,
411 415
412 if (buflen != (2 * ad->k * (sizeof (struct ec_mpi) + sizeof (*proof2)))) 416 if (buflen != (2 * ad->k * (sizeof (struct ec_mpi) + sizeof (*proof2))))
413 { 417 {
414 weprintf ("wrong size of received outcome decryption"); 418 GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING,
419 "libbrandt",
420 "wrong size of received outcome decryption\n");
415 goto quit; 421 goto quit;
416 } 422 }
417 423
@@ -429,7 +435,9 @@ mp_pub_recv_decryption (struct BRANDT_Auction *ad,
429 ec_gen, 435 ec_gen,
430 proof2)) 436 proof2))
431 { 437 {
432 weprintf ("wrong zkp2 for phi, y received"); 438 GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING,
439 "libbrandt",
440 "wrong zkp2 for phi, y received\n");
433 goto quit; 441 goto quit;
434 } 442 }
435 ec_point_copy (ad->phi3[sender][comp][j], phi); 443 ec_point_copy (ad->phi3[sender][comp][j], phi);
@@ -496,7 +504,9 @@ mp_pub_determine_outcome (struct BRANDT_Auction *ad,
496 { 504 {
497 if (cur_winner >= ad->m) 505 if (cur_winner >= ad->m)
498 { 506 {
499 weprintf ("too many winners detected"); 507 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR,
508 "libbrandt",
509 "too many winners detected\n");
500 GNUNET_free (ret); 510 GNUNET_free (ret);
501 ret = NULL; 511 ret = NULL;
502 goto quit; 512 goto quit;
@@ -511,7 +521,9 @@ mp_pub_determine_outcome (struct BRANDT_Auction *ad,
511 521
512 if (cur_winner != ad->m) 522 if (cur_winner != ad->m)
513 { 523 {
514 weprintf ("too few winners detected"); 524 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR,
525 "libbrandt",
526 "too few winners detected\n");
515 GNUNET_free (ret); 527 GNUNET_free (ret);
516 ret = NULL; 528 ret = NULL;
517 goto quit; 529 goto quit;