Skip to content

Commit

Permalink
Merge pull request #107 from jajik/refactor-long-functions
Browse files Browse the repository at this point in the history
Refactor create_worker, minor code tweaks
  • Loading branch information
jajik authored Aug 3, 2023
2 parents df4ea2a + 10564ce commit 6e74499
Show file tree
Hide file tree
Showing 2 changed files with 518 additions and 492 deletions.
10 changes: 3 additions & 7 deletions native/mod_manager/mod_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -811,18 +811,16 @@ static void read_remove_context(mem_t *mem, contextinfo_t *context)
{
contextinfo_t *info;
info = read_context(mem, context);
if (info == NULL) {
return;
if (info != NULL) {
remove_context(mem, info->id);
}
remove_context(mem, info->id);
}

/*
* Insert the context from Context information
* Note:
* 1 - if status is REMOVE remove_context will be called.
* 2 - return codes of REMOVE are ignored (always success).
*
*/
static apr_status_t insert_update_contexts(mem_t *mem, char *str, int node, int vhost, int status)
{
Expand Down Expand Up @@ -1239,11 +1237,9 @@ static char *process_config(request_rec *r, char **ptr, int *errtype)
phost->next = apr_palloc(r->pool, sizeof(struct cluster_host));
phost = phost->next;
phost->next = NULL;
phost->host = ptr[i + 1];
phost->context = NULL;
} else {
phost->host = ptr[i + 1];
}
phost->host = ptr[i + 1];
}
if (strcasecmp(ptr[i], "Context") == 0) {
if (phost->context) {
Expand Down
Loading

0 comments on commit 6e74499

Please sign in to comment.