]> git.tuebingen.mpg.de Git - adu.git/commitdiff
Fix uid counting.
authorAndre Noll <maan@systemlinux.org>
Fri, 30 May 2008 13:10:51 +0000 (15:10 +0200)
committerAndre Noll <maan@systemlinux.org>
Fri, 30 May 2008 13:10:51 +0000 (15:10 +0200)
It was only correct in create mode.

adu.c

diff --git a/adu.c b/adu.c
index 8077bd923cb2836816cb434b2280a19dc330d52d..5728a3180d7f954714d0af64be713c435feb2f5f 100644 (file)
--- a/adu.c
+++ b/adu.c
@@ -243,13 +243,13 @@ static int open_user_table(struct user_info *ui, int create)
        ui->desc->column_descriptions = user_table_cols;
        ui->desc->dir = para_strdup(conf.database_dir_arg);
        ui->desc->name = make_message("%u", (unsigned)ui->uid);
        ui->desc->column_descriptions = user_table_cols;
        ui->desc->dir = para_strdup(conf.database_dir_arg);
        ui->desc->name = make_message("%u", (unsigned)ui->uid);
-       num_uids++;
        INFO_LOG(".............................uid #%u: %u\n",
                (unsigned)num_uids, (unsigned)ui->uid);
        if (create) {
                ret = osl_create_table(ui->desc);
                if (ret < 0)
                        goto err;
        INFO_LOG(".............................uid #%u: %u\n",
                (unsigned)num_uids, (unsigned)ui->uid);
        if (create) {
                ret = osl_create_table(ui->desc);
                if (ret < 0)
                        goto err;
+               num_uids++;
        }
        ret = osl_open_table(ui->desc, &ui->table);
        if (ret < 0)
        }
        ret = osl_open_table(ui->desc, &ui->table);
        if (ret < 0)