Skip to content

Commit 0ccb227

Browse files
authored
Merge pull request #281 from jajik/issue-278
Simplify and fix CONFIG parameters handling
2 parents a27c692 + 4c442d1 commit 0ccb227

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

native/mod_manager/mod_manager.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,7 @@ static char **process_buff(request_rec *r, char *buff)
742742

743743
static apr_status_t insert_update_host_helper(server_rec *s, mem_t *mem, hostinfo_t *info, char *alias)
744744
{
745+
(void)s;
745746
strncpy(info->host, alias, HOSTALIASZ);
746747
info->host[HOSTALIASZ] = '\0';
747748
return insert_update_host(mem, info);
@@ -797,6 +798,7 @@ static void read_remove_context(mem_t *mem, contextinfo_t *context)
797798
static apr_status_t insert_update_context_helper(server_rec *s, mem_t *mem, contextinfo_t *info, char *context,
798799
int status)
799800
{
801+
(void)s;
800802
info->id = 0;
801803
strncpy(info->context, context, CONTEXTSZ);
802804
info->context[CONTEXTSZ] = '\0';
@@ -1247,7 +1249,7 @@ static char *process_context_alias(char *key, char *val, apr_pool_t *p, struct c
12471249
if (strcasecmp(key, "Alias") == 0) {
12481250
char *tmp;
12491251

1250-
if (phost->host && ((!phost->context && in_config) || !in_config)) {
1252+
if (phost->host && !in_config) {
12511253
*errtype = TYPESYNTAX;
12521254
return in_config ? SALIBAD : SMULALB;
12531255
}
@@ -1272,9 +1274,9 @@ static char *process_context_alias(char *key, char *val, apr_pool_t *p, struct c
12721274
}
12731275

12741276
if (strcasecmp(key, "Context") == 0) {
1275-
if (phost->context) {
1277+
if (phost->context && !in_config) {
12761278
*errtype = TYPESYNTAX;
1277-
return in_config ? SCONBAD : SMULCTB;
1279+
return SMULCTB;
12781280
}
12791281
if (check_context_alias_length(val, CONTEXTSZ)) {
12801282
*errtype = TYPESYNTAX;

0 commit comments

Comments
 (0)