]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - blob.c
Fix com_add segfault.
[paraslash.git] / blob.c
diff --git a/blob.c b/blob.c
index fa5134d7e0e066a3e8ea0627a11d1482c87b861e..559564506e399d39c9a43123745c5941a9ee75da 100644 (file)
--- a/blob.c
+++ b/blob.c
@@ -352,11 +352,11 @@ static int blob_get_name_by_id(struct osl_table *table, uint32_t id,
        }
 
 static int blob_init(struct osl_table **table,
-               const struct osl_table_description *desc,
-               struct table_info *ti)
+               struct osl_table_description *desc,
+               struct table_info *ti, const char *db)
 {
        int ret;
-
+       desc->dir = db;
        ti->desc = desc;
        ret = osl_open_table(ti->desc, &ti->table);
        if (ret >= 0) {
@@ -369,10 +369,10 @@ static int blob_init(struct osl_table **table,
 
 /** Define the \p init function for this blob type. */
 #define DEFINE_BLOB_INIT(table_name) \
-       int table_name ## _init(struct table_info *ti) \
+       int table_name ## _init(struct table_info *ti, const char *db) \
        { \
                return blob_init(&table_name ## _table, \
-                       &table_name ## _table_desc, ti); \
+                       &table_name ## _table_desc, ti, db); \
        }