Skip to content

Commit

Permalink
Optimize config loading messages
Browse files Browse the repository at this point in the history
  • Loading branch information
lifenjoiner committed Jun 30, 2022
1 parent 063c07f commit 5815d74
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
12 changes: 6 additions & 6 deletions filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,18 +193,18 @@ static int DisabledDomain_Init(ConfigFileInfo *ConfigInfo)

if( FilterDomain_Init(&TempDisabledDomain, ConfigInfo) != 0 )
{
INFO("Disabled domains was not initialized.\n");
INFO("Loading DisabledDomain failed.\n");
return -1;
} else {
INFO("Disabled domains initialized.\n");
INFO("Loading DisabledDomain completed.\n");
}

if( FilterDomain_InitFromFile(&TempDisabledDomain, ConfigInfo) != 0 )
{
INFO("Disabled list was not initialized.\n");
INFO("Loading DisabledList failed.\n");
return -1;
} else {
INFO("Disabled list initialized.\n");
INFO("Loading DisabledList completed.\n");
}

RWLock_WrLock(DisabledDomainLock);
Expand All @@ -225,9 +225,9 @@ int Filter_Init(ConfigFileInfo *ConfigInfo)

if( FilterType_Init(ConfigInfo) != 0 )
{
INFO("Disabled types was not initialized.\n");
INFO("Setting DisabledType failed.\n");
} else {
INFO("Disabled types initialized.\n");
INFO("Setting DisabledType succeeded.\n");
}

RWLock_Init(DisabledDomainLock);
Expand Down
4 changes: 4 additions & 0 deletions goodiplist.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ static int InitListsAndTimes(ConfigFileInfo *ConfigInfo)
StringChunk_Add(GoodIpList, n, (const char *)&m, sizeof(ListInfo));
}

INFO("Loading GoodIPList completed.\n");

return 0;
}

Expand Down Expand Up @@ -197,6 +199,8 @@ static int AddToLists(ConfigFileInfo *ConfigInfo)
Array_PushBack(&(m->List), &ip, NULL);
}

INFO("Loading GoodIPListAddIP completed.\n");

return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion mmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ static int Modules_Init(ModuleMap *ModuleMap, ConfigFileInfo *ConfigInfo)
}
}

INFO("Server groups initialized.\n", Type);
INFO("Loading Server Groups completed.\n", Type);
return 0;
}

Expand Down

0 comments on commit 5815d74

Please sign in to comment.