diff options
Diffstat (limited to 'src/peerinfo')
-rw-r--r-- | src/peerinfo/gnunet-service-peerinfo.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c index b7fa1c722..25a7ae3b1 100644 --- a/src/peerinfo/gnunet-service-peerinfo.c +++ b/src/peerinfo/gnunet-service-peerinfo.c | |||
@@ -386,6 +386,21 @@ read_host_file (const char *fn, | |||
386 | now = GNUNET_TIME_absolute_get (); | 386 | now = GNUNET_TIME_absolute_get (); |
387 | hello_clean = GNUNET_HELLO_iterate_addresses (hello, GNUNET_YES, | 387 | hello_clean = GNUNET_HELLO_iterate_addresses (hello, GNUNET_YES, |
388 | &discard_expired, &now); | 388 | &discard_expired, &now); |
389 | if (NULL == hello_clean) | ||
390 | { | ||
391 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
392 | _("Failed to parse HELLO in file `%s': %s %u \n"), | ||
393 | fn, | ||
394 | "HELLO is invalid and has size of ", | ||
395 | size_hello); | ||
396 | if ((GNUNET_YES == unlink_garbage) && | ||
397 | (0 != UNLINK (fn)) && | ||
398 | (ENOENT != errno) ) | ||
399 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, | ||
400 | "unlink", | ||
401 | fn); | ||
402 | return; | ||
403 | } | ||
389 | left = 0; | 404 | left = 0; |
390 | (void) GNUNET_HELLO_iterate_addresses (hello_clean, GNUNET_NO, | 405 | (void) GNUNET_HELLO_iterate_addresses (hello_clean, GNUNET_NO, |
391 | &count_addresses, &left); | 406 | &count_addresses, &left); |