From be61ca007f86b3ad4484feef3890d25ef3a0765e Mon Sep 17 00:00:00 2001 From: nishi Date: Mon, 15 Apr 2024 02:45:48 +0000 Subject: [PATCH] fix git-svn-id: file:///raid/svn-main/nishi-mandshurica/trunk@29 f982e544-4a7d-3444-ad1a-fde59a2a69f1 --- Module/basic.c | 15 ++++++++++++++- Module/subversion.c | 1 - 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Module/basic.c b/Module/basic.c index c03708a..1e3497c 100644 --- a/Module/basic.c +++ b/Module/basic.c @@ -30,9 +30,10 @@ #include "../Mandshurica/mandshurica.h" #include "../Mandshurica/ms_log.h" +#include "../Mandshurica/ms_util.h" +#include #include -#include const char mod_type[] = MS_MOD_AUTH; @@ -43,5 +44,17 @@ struct mandshurica_config* config; int mod_init(struct mandshurica_config* _config) { config = _config; config->mandshurica_log(MS_INFO, "Basic authentication Module init"); + + char* db = config->mandshurica_get_param("BasicDB"); + + if(db == NULL) { + config->mandshurica_log(MS_ERROR, "Basic authentication Database path is not set!"); + return 1; + } + + char* log = mandshurica_strcat("Basic authentication Database is ", db); + config->mandshurica_log(MS_INFO, log); + free(log); + return 0; } diff --git a/Module/subversion.c b/Module/subversion.c index 4141f46..3756e4c 100644 --- a/Module/subversion.c +++ b/Module/subversion.c @@ -34,7 +34,6 @@ #include #include -#include #include const char mod_type[] = MS_MOD_VCS; -- 2.43.0