Add #define for database dir.
authorAndre Noll <maan@systemlinux.org>
Sun, 25 May 2008 16:11:18 +0000 (18:11 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 25 May 2008 16:11:18 +0000 (18:11 +0200)
Of course, this should be configurabe intstead..

adu.c

diff --git a/adu.c b/adu.c
index a7ac6b49aa05629c59169cb2f29f044a9413e747..20f0f61bbc114ffc9b270ab31991970907ff142a 100644 (file)
--- a/adu.c
+++ b/adu.c
@@ -10,6 +10,8 @@
 
 DEFINE_ERRLIST;
 
+#define DATABASE_DIR "/tmp/adu"
+
 /** evaluates to 1 if x < y, to -1 if x > y and to 0 if x == y */
 #define NUM_COMPARE(x, y) ((int)((x) < (y)) - (int)((x) > (y)))
 
@@ -135,7 +137,7 @@ static struct osl_table_description dir_table_desc = {
        .num_columns = NUM_DT_COLUMNS,
        .flags = 0,
        .column_descriptions = dir_table_cols,
-       .dir = "/tmp/adu"
+       .dir = DATABASE_DIR
 };
 
 /** The columns of the id table. */
@@ -202,7 +204,7 @@ int create_and_open_user_table(uint32_t uid, struct osl_table **t)
        desc->num_columns = NUM_UT_COLUMNS;
        desc->flags = 0;
        desc->column_descriptions = user_table_cols;
-       desc->dir = para_strdup("/tmp/adu");
+       desc->dir = para_strdup(DATABASE_DIR);
        desc->name = make_message("%u", uid);
        INFO_LOG("................................. %u\n", uid);
 //     user_table_desc.name = make_message("%u", uid);