diff options
Diffstat (limited to 'src/statistics/gnunet-service-statistics.c')
-rw-r--r-- | src/statistics/gnunet-service-statistics.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/statistics/gnunet-service-statistics.c b/src/statistics/gnunet-service-statistics.c index 5d58c3743..d40f74aaf 100644 --- a/src/statistics/gnunet-service-statistics.c +++ b/src/statistics/gnunet-service-statistics.c | |||
@@ -263,7 +263,7 @@ save () | |||
263 | return; | 263 | return; |
264 | } | 264 | } |
265 | (void) GNUNET_DISK_directory_create_for_file (fn); | 265 | (void) GNUNET_DISK_directory_create_for_file (fn); |
266 | wh = GNUNET_BIO_write_open (fn); | 266 | wh = GNUNET_BIO_write_open_file (fn); |
267 | total = 0; | 267 | total = 0; |
268 | while (NULL != (se = sub_head)) | 268 | while (NULL != (se = sub_head)) |
269 | { | 269 | { |
@@ -290,10 +290,10 @@ save () | |||
290 | msg->flags = | 290 | msg->flags = |
291 | htonl (pos->persistent ? GNUNET_STATISTICS_SETFLAG_PERSISTENT : 0); | 291 | htonl (pos->persistent ? GNUNET_STATISTICS_SETFLAG_PERSISTENT : 0); |
292 | msg->value = GNUNET_htonll (pos->value); | 292 | msg->value = GNUNET_htonll (pos->value); |
293 | if (GNUNET_OK != GNUNET_BIO_write (wh, msg, size)) | 293 | if (GNUNET_OK != GNUNET_BIO_write (wh, "statistics-save-msg", msg, size)) |
294 | { | 294 | { |
295 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "write", fn); | 295 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "write", fn); |
296 | if (GNUNET_OK != GNUNET_BIO_write_close (wh)) | 296 | if (GNUNET_OK != GNUNET_BIO_write_close (wh, NULL)) |
297 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "close", fn); | 297 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "close", fn); |
298 | wh = NULL; | 298 | wh = NULL; |
299 | } | 299 | } |
@@ -309,7 +309,7 @@ save () | |||
309 | } | 309 | } |
310 | if (NULL != wh) | 310 | if (NULL != wh) |
311 | { | 311 | { |
312 | if (GNUNET_OK != GNUNET_BIO_write_close (wh)) | 312 | if (GNUNET_OK != GNUNET_BIO_write_close (wh, NULL)) |
313 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "close", fn); | 313 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "close", fn); |
314 | if (0 == total) | 314 | if (0 == total) |
315 | GNUNET_break (0 == unlink (fn)); | 315 | GNUNET_break (0 == unlink (fn)); |
@@ -964,7 +964,7 @@ load () | |||
964 | return; | 964 | return; |
965 | } | 965 | } |
966 | buf = GNUNET_malloc (fsize); | 966 | buf = GNUNET_malloc (fsize); |
967 | rh = GNUNET_BIO_read_open (fn); | 967 | rh = GNUNET_BIO_read_open_file (fn); |
968 | if (! rh) | 968 | if (! rh) |
969 | { | 969 | { |
970 | GNUNET_free (buf); | 970 | GNUNET_free (buf); |