diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-10-25 19:28:48 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-10-25 19:28:48 +0000 |
commit | 99bb34bf91253eb90fd1bc900af88580c6461e53 (patch) | |
tree | 12802c0669e910d45fbb811f71aa642bb4bb6332 /src/peerinfo | |
parent | c3bf5dd8d37b9e65a973c9fb83734f8ff7401266 (diff) | |
download | gnunet-99bb34bf91253eb90fd1bc900af88580c6461e53.tar.gz gnunet-99bb34bf91253eb90fd1bc900af88580c6461e53.zip |
more consistent disk API
Diffstat (limited to 'src/peerinfo')
-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 3608dab84..b9b242522 100644 --- a/src/peerinfo/gnunet-service-peerinfo.c +++ b/src/peerinfo/gnunet-service-peerinfo.c | |||
@@ -477,9 +477,10 @@ flush_trust (struct HostEntry *host) | |||
477 | else | 477 | else |
478 | { | 478 | { |
479 | trust = htonl (host->trust); | 479 | trust = htonl (host->trust); |
480 | if (GNUNET_OK == GNUNET_DISK_fn_write (fn, &trust, sizeof(uint32_t), | 480 | if (sizeof(uint32_t) == GNUNET_DISK_fn_write (fn, &trust, |
481 | GNUNET_DISK_PERM_USER_READ | GNUNET_DISK_PERM_USER_WRITE | 481 | sizeof(uint32_t), |
482 | | GNUNET_DISK_PERM_GROUP_READ | GNUNET_DISK_PERM_OTHER_READ)) | 482 | GNUNET_DISK_PERM_USER_READ | GNUNET_DISK_PERM_USER_WRITE |
483 | | GNUNET_DISK_PERM_GROUP_READ | GNUNET_DISK_PERM_OTHER_READ)) | ||
483 | host->disk_trust = host->trust; | 484 | host->disk_trust = host->trust; |
484 | } | 485 | } |
485 | GNUNET_free (fn); | 486 | GNUNET_free (fn); |