#include <sys/file.h>
#include <fcntl.h>
#include "database.h"
+#include "configuration.h"
#include "subscription.h"
+#include "tags.h"
#include "util.h"
#include "config.h"
return r; \
}
+int blerg_init() {
+ if (!blerg_configuration_init()) {
+ return 0;
+ }
+ return 1;
+}
+
uint64_t blerg_get_record_count(struct blerg *blerg) {
uint64_t count;
flock(blerg->meta_fd, LOCK_SH);
return 0;
}
- snprintf(filename, 512, "%s/%s", DATA_PATH, name);
+ snprintf(filename, 512, "%s/%s", blergconf.data_path, name);
if (access(filename, F_OK) == -1)
return 0;
else
/* Make the directory if it doesn't exist */
blerg->base_path = malloc(512);
- snprintf(blerg->base_path, 512, "%s/%s", DATA_PATH, name);
+ snprintf(blerg->base_path, 512, "%s/%s", blergconf.data_path, name);
if (access(blerg->base_path, F_OK) == -1)
mkdir(blerg->base_path, 0755);