aboutsummaryrefslogtreecommitdiff
path: root/src/revocation/gnunet-service-revocation.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-11-27 12:28:49 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-11-27 12:28:49 +0000
commit7f2fbbdb0027a16e8de322e40d346cb70809af8f (patch)
treed0c9b491017897f4290bfe4474009f5c62330289 /src/revocation/gnunet-service-revocation.c
parent800ac5056afa9fb4b5add0e503ecd150e594151d (diff)
downloadgnunet-7f2fbbdb0027a16e8de322e40d346cb70809af8f.tar.gz
gnunet-7f2fbbdb0027a16e8de322e40d346cb70809af8f.zip
minor corrections to revocation service
revocation testtest now passes
Diffstat (limited to 'src/revocation/gnunet-service-revocation.c')
-rw-r--r--src/revocation/gnunet-service-revocation.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/revocation/gnunet-service-revocation.c b/src/revocation/gnunet-service-revocation.c
index 11f3fab77..f0b33a459 100644
--- a/src/revocation/gnunet-service-revocation.c
+++ b/src/revocation/gnunet-service-revocation.c
@@ -239,6 +239,7 @@ do_flood (void *cls,
239 239
240 e = GNUNET_MQ_msg (cp, GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE); 240 e = GNUNET_MQ_msg (cp, GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE);
241 *cp = *rm; 241 *cp = *rm;
242 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Flooding revocation to `%s'\n", GNUNET_i2s (target));
242 GNUNET_MQ_send (pe->mq, e); 243 GNUNET_MQ_send (pe->mq, e);
243 return GNUNET_OK; 244 return GNUNET_OK;
244} 245}
@@ -313,6 +314,11 @@ publicize_rm (const struct RevokeMessage *rm)
313 GNUNET_break (0); 314 GNUNET_break (0);
314 return GNUNET_OK; 315 return GNUNET_OK;
315 } 316 }
317 else
318 {
319 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
320 "Added revocation info to SET\n");
321 }
316 /* flood to neighbours */ 322 /* flood to neighbours */
317 GNUNET_CONTAINER_multipeermap_iterate (peers, 323 GNUNET_CONTAINER_multipeermap_iterate (peers,
318 &do_flood, 324 &do_flood,
@@ -459,6 +465,10 @@ transmit_task_cb (void *cls,
459 struct PeerEntry *peer_entry = cls; 465 struct PeerEntry *peer_entry = cls;
460 uint16_t salt; 466 uint16_t salt;
461 467
468 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
469 "Starting set exchange with peer `%s'\n",
470 GNUNET_i2s (&peer_entry->id));
471
462 salt = (uint16_t) GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 472 salt = (uint16_t) GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
463 UINT16_MAX); 473 UINT16_MAX);
464 peer_entry->transmit_task = GNUNET_SCHEDULER_NO_TASK; 474 peer_entry->transmit_task = GNUNET_SCHEDULER_NO_TASK;
@@ -495,6 +505,9 @@ handle_core_connect (void *cls,
495 struct GNUNET_HashCode my_hash; 505 struct GNUNET_HashCode my_hash;
496 struct GNUNET_HashCode peer_hash; 506 struct GNUNET_HashCode peer_hash;
497 507
508 if (0 == memcmp(peer, &my_identity, sizeof (my_identity)))
509 return;
510
498 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 511 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
499 "Peer `%s' connected to us\n", 512 "Peer `%s' connected to us\n",
500 GNUNET_i2s (peer)); 513 GNUNET_i2s (peer));
@@ -519,6 +532,9 @@ handle_core_connect (void *cls,
519 if (0 < GNUNET_CRYPTO_hash_cmp (&my_hash, 532 if (0 < GNUNET_CRYPTO_hash_cmp (&my_hash,
520 &peer_hash)) 533 &peer_hash))
521 { 534 {
535 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
536 "Starting SET operation with peer `%s'\n",
537 GNUNET_i2s (peer));
522 peer_entry->transmit_task = 538 peer_entry->transmit_task =
523 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, 539 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
524 &transmit_task_cb, 540 &transmit_task_cb,
@@ -541,6 +557,9 @@ handle_core_disconnect (void *cls,
541{ 557{
542 struct PeerEntry *pos; 558 struct PeerEntry *pos;
543 559
560 if (0 == memcmp(peer, &my_identity, sizeof (my_identity)))
561 return;
562
544 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 563 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
545 "Peer `%s' disconnected from us\n", 564 "Peer `%s' disconnected from us\n",
546 GNUNET_i2s (peer)); 565 GNUNET_i2s (peer));