From ba4df29abd2e08d168edff95fff5067c6e3e747f Mon Sep 17 00:00:00 2001 From: default Date: Tue, 31 Jan 2023 18:38:56 +0100 Subject: [PATCH] More symbol renaming. --- main.c | 2 +- snac.h | 2 +- utils.c | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 2802e76..9bcc545 100644 --- a/main.c +++ b/main.c @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) /* ... */ basedir = GET_ARGV(); - return initdb(basedir); + return snac_init(basedir); } if (strcmp(cmd, "upgrade") == 0) { diff --git a/snac.h b/snac.h index ecf47a4..0088afc 100644 --- a/snac.h +++ b/snac.h @@ -178,6 +178,6 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char * int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size, char **body, int *b_size, char **ctype); -int initdb(const char *_basedir); +int snac_init(const char *_basedir); int adduser(const char *uid); int resetpwd(snac *snac); diff --git a/utils.c b/utils.c index 4bc1b01..11b0799 100644 --- a/utils.c +++ b/utils.c @@ -79,7 +79,7 @@ const char *greeting_html = "

This site is powered by snac.

\n" "\n"; -int initdb(const char *basedir) +int snac_init(const char *basedir) { FILE *f; @@ -154,6 +154,9 @@ int initdb(const char *basedir) xs *odir = xs_fmt("%s/object", srv_basedir); mkdir(odir, 0755); + xs *qdir = xs_fmt("%s/queue", srv_basedir); + mkdir(qdir, 0755); + xs *gfn = xs_fmt("%s/greeting.html", srv_basedir); if ((f = fopen(gfn, "w")) == NULL) { printf("ERROR: cannot create '%s'\n", gfn);