- wh = NULL;
- fn = GNUNET_DISK_get_home_filename (cfg, "statistics", "statistics.data",
- NULL);
- if (fn != NULL)
- wh = GNUNET_BIO_write_open (fn);
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_filename (cfg,
+ "STATISTICS",
+ "DATABASE",
+ &fn))
+ {
+ GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+ "STATISTICS",
+ "DATABASE");
+ return;
+ }
+ (void) GNUNET_DISK_directory_create_for_file (fn);
+ wh = GNUNET_BIO_write_open (fn);