aboutsummaryrefslogtreecommitdiff
path: root/src/peerinfo
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-03-13 10:01:27 +0000
committerChristian Grothoff <christian@grothoff.org>2010-03-13 10:01:27 +0000
commitaa732e790d106d65584be3e41ca81feed9e5e3c1 (patch)
tree59f896b4326786048fd8ef44920f88522d598ec4 /src/peerinfo
parentb222a525e6eaf5ca36361341beced1040d215e27 (diff)
downloadgnunet-aa732e790d106d65584be3e41ca81feed9e5e3c1.tar.gz
gnunet-aa732e790d106d65584be3e41ca81feed9e5e3c1.zip
nicer logging
Diffstat (limited to 'src/peerinfo')
-rw-r--r--src/peerinfo/gnunet-service-peerinfo.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c
index c67d35e38..703ebee4c 100644
--- a/src/peerinfo/gnunet-service-peerinfo.c
+++ b/src/peerinfo/gnunet-service-peerinfo.c
@@ -148,7 +148,12 @@ discard_expired (void *cls,
148{ 148{
149 const struct GNUNET_TIME_Absolute *now = cls; 149 const struct GNUNET_TIME_Absolute *now = cls;
150 if (now->value > expiration.value) 150 if (now->value > expiration.value)
151 return GNUNET_NO; 151 {
152 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
153 _("Removing expired address of transport `%s'\n"),
154 tname);
155 return GNUNET_NO;
156 }
152 return GNUNET_OK; 157 return GNUNET_OK;
153} 158}
154 159
@@ -584,9 +589,6 @@ discard_hosts_helper (void *cls, const char *fn)
584 new_hello = GNUNET_HELLO_iterate_addresses (hello, 589 new_hello = GNUNET_HELLO_iterate_addresses (hello,
585 GNUNET_YES, 590 GNUNET_YES,
586 &discard_expired, now); 591 &discard_expired, now);
587 if ((new_hello == NULL) && (0 != UNLINK (fn)))
588 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING |
589 GNUNET_ERROR_TYPE_BULK, "unlink", fn);
590 if (new_hello != NULL) 592 if (new_hello != NULL)
591 { 593 {
592 GNUNET_DISK_fn_write (fn, 594 GNUNET_DISK_fn_write (fn,
@@ -596,6 +598,12 @@ discard_hosts_helper (void *cls, const char *fn)
596 | GNUNET_DISK_PERM_GROUP_READ | GNUNET_DISK_PERM_OTHER_READ); 598 | GNUNET_DISK_PERM_GROUP_READ | GNUNET_DISK_PERM_OTHER_READ);
597 GNUNET_free (new_hello); 599 GNUNET_free (new_hello);
598 } 600 }
601 else
602 {
603 if (0 != UNLINK (fn))
604 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING |
605 GNUNET_ERROR_TYPE_BULK, "unlink", fn);
606 }
599 return GNUNET_OK; 607 return GNUNET_OK;
600} 608}
601 609