RPS test/profiler: Check success of opening file
authorJulius Bünger <buenger@mytum.de>
Wed, 28 Nov 2018 09:53:00 +0000 (10:53 +0100)
committerJulius Bünger <buenger@mytum.de>
Wed, 28 Nov 2018 09:55:38 +0000 (10:55 +0100)
src/rps/rps-test_util.c

index d0d195229cef2c01da79159e7818a4e9cd708792..4383c714992a8d93aac57545d536a31f8fa920bf 100644 (file)
@@ -92,6 +92,13 @@ get_file_handle (const char *name)
                                 GNUNET_DISK_PERM_USER_READ |
                                 GNUNET_DISK_PERM_USER_WRITE |
                                 GNUNET_DISK_PERM_GROUP_READ);
+    if (NULL == fh)
+    {
+      LOG (GNUNET_ERROR_TYPE_ERROR,
+           "Openning file `%s' failed.\n",
+           name);
+      GNUNET_assert (0);
+    }
     GNUNET_CONTAINER_multihashmap_put (open_files,
                                        &hash,
                                        fh,