diff options
Diffstat (limited to 'src/peerinfo/gnunet-service-peerinfo.c')
-rw-r--r-- | src/peerinfo/gnunet-service-peerinfo.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c index d08f9920c..ce7a38a6d 100644 --- a/src/peerinfo/gnunet-service-peerinfo.c +++ b/src/peerinfo/gnunet-service-peerinfo.c | |||
@@ -455,9 +455,10 @@ read_host_file (const char *fn, int unlink_garbage, struct ReadHostFileContext * | |||
455 | 455 | ||
456 | 456 | ||
457 | /** | 457 | /** |
458 | * Add a host to the list. | 458 | * Add a host to the list and notify clients about this event |
459 | * | 459 | * |
460 | * @param identity the identity of the host | 460 | * @param identity the identity of the host |
461 | * @return the HostEntry | ||
461 | */ | 462 | */ |
462 | static struct HostEntry * | 463 | static struct HostEntry * |
463 | add_host_to_known_hosts (const struct GNUNET_PeerIdentity *identity) | 464 | add_host_to_known_hosts (const struct GNUNET_PeerIdentity *identity) |
@@ -469,6 +470,7 @@ add_host_to_known_hosts (const struct GNUNET_PeerIdentity *identity) | |||
469 | entry = GNUNET_CONTAINER_multihashmap_get (hostmap, &identity->hashPubKey); | 470 | entry = GNUNET_CONTAINER_multihashmap_get (hostmap, &identity->hashPubKey); |
470 | if (NULL == entry) | 471 | if (NULL == entry) |
471 | { | 472 | { |
473 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Adding new peer `%s'\n", GNUNET_i2s (identity)); | ||
472 | GNUNET_STATISTICS_update (stats, gettext_noop ("# peers known"), 1, | 474 | GNUNET_STATISTICS_update (stats, gettext_noop ("# peers known"), 1, |
473 | GNUNET_NO); | 475 | GNUNET_NO); |
474 | entry = GNUNET_malloc (sizeof (struct HostEntry)); | 476 | entry = GNUNET_malloc (sizeof (struct HostEntry)); |
@@ -484,6 +486,7 @@ add_host_to_known_hosts (const struct GNUNET_PeerIdentity *identity) | |||
484 | entry->friend_only_hello = r.friend_only_hello; | 486 | entry->friend_only_hello = r.friend_only_hello; |
485 | GNUNET_free (fn); | 487 | GNUNET_free (fn); |
486 | } | 488 | } |
489 | notify_all (entry); | ||
487 | } | 490 | } |
488 | return entry; | 491 | return entry; |
489 | } | 492 | } |
@@ -624,8 +627,6 @@ hosts_directory_scan_callback (void *cls, const char *fullname) | |||
624 | GNUNET_i2s (&id)); | 627 | GNUNET_i2s (&id)); |
625 | update_hello (&id, r.friend_only_hello); | 628 | update_hello (&id, r.friend_only_hello); |
626 | } | 629 | } |
627 | |||
628 | notify_all (entry); | ||
629 | dsc->matched++; | 630 | dsc->matched++; |
630 | return GNUNET_OK; | 631 | return GNUNET_OK; |
631 | } | 632 | } |