aboutsummaryrefslogtreecommitdiff
path: root/src/rps/rps-test_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rps/rps-test_util.c')
-rw-r--r--src/rps/rps-test_util.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/rps/rps-test_util.c b/src/rps/rps-test_util.c
index a3354b0ac..5ba477bb7 100644
--- a/src/rps/rps-test_util.c
+++ b/src/rps/rps-test_util.c
@@ -82,6 +82,11 @@ to_file_ (char *file_name, char *line)
82 "Unable to write to file! (Size: %u, size2: %u)\n", 82 "Unable to write to file! (Size: %u, size2: %u)\n",
83 size, 83 size,
84 size2); 84 size2);
85
86 if (GNUNET_YES != GNUNET_DISK_file_close (f))
87 LOG (GNUNET_ERROR_TYPE_WARNING,
88 "Unable to close file\n");
89
85 return; 90 return;
86 } 91 }
87 92
@@ -149,9 +154,12 @@ create_file (const char *name)
149 if (0 > size) 154 if (0 > size)
150 LOG (GNUNET_ERROR_TYPE_WARNING, "Failed to create name_buf\n"); 155 LOG (GNUNET_ERROR_TYPE_WARNING, "Failed to create name_buf\n");
151 156
152 GNUNET_DISK_directory_create (prefix); 157 if (GNUNET_YES != GNUNET_DISK_directory_create (prefix))
153 158 {
154 file_name = GNUNET_malloc (strlen (name_buf) + 6); 159 LOG (GNUNET_ERROR_TYPE_WARNING,
160 "Could not create directory %s.\n",
161 prefix);
162 }
155 163
156 if (NULL == (file_name = GNUNET_DISK_mktemp (name_buf))) 164 if (NULL == (file_name = GNUNET_DISK_mktemp (name_buf)))
157 LOG (GNUNET_ERROR_TYPE_WARNING, "Could not create file\n"); 165 LOG (GNUNET_ERROR_TYPE_WARNING, "Could not create file\n");