tpws,nfqws: return lists reload on HUP

This commit is contained in:
bol-van
2025-01-24 11:12:56 +03:00
parent 80a0b38295
commit 2ff6ec03aa
12 changed files with 92 additions and 5 deletions

View File

@@ -154,7 +154,6 @@ void strlist_destroy(struct str_list_head *head)
struct hostlist_file *hostlist_files_add(struct hostlist_files_head *head, const char *filename)
{
struct hostlist_file *entry = malloc(sizeof(struct hostlist_file));
@@ -202,6 +201,13 @@ struct hostlist_file *hostlist_files_search(struct hostlist_files_head *head, co
}
return NULL;
}
void hostlist_files_reset_modtime(struct hostlist_files_head *list)
{
struct hostlist_file *hfile;
LIST_FOREACH(hfile, list, next)
hfile->mod_time=0;
}
struct hostlist_item *hostlist_collection_add(struct hostlist_collection_head *head, struct hostlist_file *hfile)
{
@@ -416,6 +422,13 @@ struct ipset_file *ipset_files_search(struct ipset_files_head *head, const char
}
return NULL;
}
void ipset_files_reset_modtime(struct ipset_files_head *list)
{
struct ipset_file *hfile;
LIST_FOREACH(hfile, list, next)
hfile->mod_time=0;
}
struct ipset_item *ipset_collection_add(struct ipset_collection_head *head, struct ipset_file *hfile)
{