[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r25604 - in gnunet/src: topology transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r25604 - in gnunet/src: topology transport |
Date: |
Thu, 20 Dec 2012 23:00:12 +0100 |
Author: grothoff
Date: 2012-12-20 23:00:12 +0100 (Thu, 20 Dec 2012)
New Revision: 25604
Modified:
gnunet/src/topology/gnunet-daemon-topology.c
gnunet/src/transport/gnunet-service-transport_blacklist.c
Log:
-check return values
Modified: gnunet/src/topology/gnunet-daemon-topology.c
===================================================================
--- gnunet/src/topology/gnunet-daemon-topology.c 2012-12-20 22:00:06 UTC
(rev 25603)
+++ gnunet/src/topology/gnunet-daemon-topology.c 2012-12-20 22:00:12 UTC
(rev 25604)
@@ -1021,10 +1021,11 @@
"topology", "FRIENDS");
return;
}
- if (GNUNET_OK != GNUNET_DISK_file_test (fn))
- GNUNET_DISK_fn_write (fn, NULL, 0,
- GNUNET_DISK_PERM_USER_READ |
- GNUNET_DISK_PERM_USER_WRITE);
+ if ( (GNUNET_OK != GNUNET_DISK_file_test (fn)) &&
+ (GNUNET_OK != GNUNET_DISK_fn_write (fn, NULL, 0,
+ GNUNET_DISK_PERM_USER_READ |
+ GNUNET_DISK_PERM_USER_WRITE)) )
+ GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "write", fn);
if (GNUNET_OK != GNUNET_DISK_file_size (fn,
&fsize, GNUNET_NO, GNUNET_YES))
{
Modified: gnunet/src/transport/gnunet-service-transport_blacklist.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_blacklist.c 2012-12-20
22:00:06 UTC (rev 25603)
+++ gnunet/src/transport/gnunet-service-transport_blacklist.c 2012-12-20
22:00:12 UTC (rev 25604)
@@ -234,10 +234,11 @@
"transport", "BLACKLIST_FILE");
return;
}
- if (GNUNET_OK != GNUNET_DISK_file_test (fn))
- GNUNET_DISK_fn_write (fn, NULL, 0,
- GNUNET_DISK_PERM_USER_READ |
- GNUNET_DISK_PERM_USER_WRITE);
+ if ( (GNUNET_OK != GNUNET_DISK_file_test (fn)) &&
+ (GNUNET_OK != GNUNET_DISK_fn_write (fn, NULL, 0,
+ GNUNET_DISK_PERM_USER_READ |
+ GNUNET_DISK_PERM_USER_WRITE)) )
+ GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "write", fn);
if (GNUNET_OK != GNUNET_DISK_file_size (fn,
&fsize, GNUNET_NO, GNUNET_YES))
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r25604 - in gnunet/src: topology transport,
gnunet <=