]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - aft.c
afs: Replace DATABASE_DIR by a runtime config option.
[paraslash.git] / aft.c
diff --git a/aft.c b/aft.c
index 1d7680714f05d39e1c0c057aaaf95b412e1626b6..3c33aae0c747513a39ddd4426a413a30e5644b58 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -126,8 +126,7 @@ static struct osl_column_description aft_cols[] = {
        }
 };
 
-static const struct osl_table_description audio_file_table_desc = {
-       .dir = DATABASE_DIR,
+static struct osl_table_description audio_file_table_desc = {
        .name = "audio_files",
        .num_columns = NUM_AFT_COLUMNS,
        .flags = OSL_LARGE_TABLE,
@@ -1712,16 +1711,18 @@ void aft_shutdown(enum osl_close_flags flags)
 /**
  * Open the audio file table.
  *
- * \param ti Gets initialized by this function
+ * \param ti Gets initialized by this function.
+ * \param db The database directory.
  *
  * \return Positive on success, negative on errors.
  *
  * \sa osl_open_table().
  */
-int aft_init(struct table_info *ti)
+int aft_init(struct table_info *ti, const char *db)
 {
        int ret;
 
+       audio_file_table_desc.dir = db;
        ti->desc = &audio_file_table_desc;
        ret = osl_open_table(ti->desc, &ti->table);
        if (ret >= 0) {