Skip to content

Commit 8631ff1

Browse files
committed
Fix bugs after Remove Redis Option
1 parent 62ef8bc commit 8631ff1

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

apache2/apache2_config.c

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "apr_lib.h"
2222
#include "acmp.h"
2323
#include "msc_crypt.h"
24+
#include "persist_dbm.h"
2425

2526
#if defined(WITH_LUA)
2627
#include "msc_lua.h"
@@ -1156,14 +1157,14 @@ static const char *cmd_test_rand_ip_range(cmd_parms *cmd, void *_dcfg, const cha
11561157

11571158
static const char *cmd_db_option(cmd_parms *cmd, void *_dcfg, const char *p1){
11581159
directory_config *dcfg = (directory_config *)_dcfg;
1159-
if((strcmp(p1,"origin")==0))
1160-
dcfg->db_option = 0;
1161-
else if((strcmp(p1,"agmdb")==0)) {
1162-
dcfg->db_option = 2;
1160+
if((strcmp(p1,"origin") == 0))
1161+
dcfg->db_option = DB_OPT_ORIGIN;
1162+
else if((strcmp(p1,"agmdb") == 0)) {
1163+
dcfg->db_option = DB_OPT_AGMDB;
11631164
dcfg->agmdb_handles = NULL;
11641165
}
11651166
else
1166-
dcfg->db_option = 0;
1167+
dcfg->db_option = DB_OPT_ORIGIN;
11671168
return NULL;
11681169
}
11691170

@@ -3236,22 +3237,6 @@ const command_rec module_directives[] = {
32363237
),
32373238
#endif
32383239

3239-
AP_INIT_TAKE1 (
3240-
"SecTestRandIpRange",
3241-
cmd_test_rand_ip_range,
3242-
NULL,
3243-
CMD_SCOPE_ANY,
3244-
"IP address range. For test only"
3245-
),
3246-
3247-
AP_INIT_TAKE1 (
3248-
"SecDBOption",
3249-
cmd_db_option,
3250-
NULL,
3251-
CMD_SCOPE_ANY,
3252-
"Choose database. (origin/redis/agdb)"
3253-
),
3254-
32553240
AP_INIT_TAKE1 (
32563241
"SecArgumentSeparator",
32573242
cmd_argument_separator,
@@ -3974,5 +3959,21 @@ const command_rec module_directives[] = {
39743959
"Set Hash parameter"
39753960
),
39763961

3962+
AP_INIT_TAKE1 (
3963+
"SecTestRandIpRange",
3964+
cmd_test_rand_ip_range,
3965+
NULL,
3966+
CMD_SCOPE_ANY,
3967+
"IP address range. For test only"
3968+
),
3969+
3970+
AP_INIT_TAKE1 (
3971+
"SecDBOption",
3972+
cmd_db_option,
3973+
NULL,
3974+
CMD_SCOPE_ANY,
3975+
"Choose database. (origin/redis/agdb)"
3976+
),
3977+
39773978
{ NULL }
39783979
};

0 commit comments

Comments
 (0)