gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r10585 - gnunet/src/peerinfo


From: gnunet
Subject: [GNUnet-SVN] r10585 - gnunet/src/peerinfo
Date: Sat, 13 Mar 2010 11:01:27 +0100

Author: grothoff
Date: 2010-03-13 11:01:27 +0100 (Sat, 13 Mar 2010)
New Revision: 10585

Modified:
   gnunet/src/peerinfo/gnunet-service-peerinfo.c
Log:
nicer logging

Modified: gnunet/src/peerinfo/gnunet-service-peerinfo.c
===================================================================
--- gnunet/src/peerinfo/gnunet-service-peerinfo.c       2010-03-13 10:00:48 UTC 
(rev 10584)
+++ gnunet/src/peerinfo/gnunet-service-peerinfo.c       2010-03-13 10:01:27 UTC 
(rev 10585)
@@ -148,7 +148,12 @@
 {
   const struct GNUNET_TIME_Absolute *now = cls;
   if (now->value > expiration.value)
-    return GNUNET_NO;
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                 _("Removing expired address of transport `%s'\n"),
+                 tname);
+      return GNUNET_NO;
+    }
   return GNUNET_OK;
 }
 
@@ -584,9 +589,6 @@
   new_hello = GNUNET_HELLO_iterate_addresses (hello,
                                               GNUNET_YES,
                                               &discard_expired, now);
-  if ((new_hello == NULL) && (0 != UNLINK (fn)))
-    GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING |
-                              GNUNET_ERROR_TYPE_BULK, "unlink", fn);
   if (new_hello != NULL)
     {
       GNUNET_DISK_fn_write (fn, 
@@ -596,6 +598,12 @@
                            | GNUNET_DISK_PERM_GROUP_READ | 
GNUNET_DISK_PERM_OTHER_READ);
       GNUNET_free (new_hello);
     }
+  else
+    {
+      if (0 != UNLINK (fn))
+       GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING |
+                                 GNUNET_ERROR_TYPE_BULK, "unlink", fn);      
+    }
   return GNUNET_OK;
 }
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]