nfqws: fail if hostlist/ipset does not exist at startup

This commit is contained in:
bol-van
2024-10-29 13:41:29 +03:00
parent e979f88963
commit 6686c4a190
3 changed files with 17 additions and 6 deletions

View File

@@ -245,6 +245,11 @@ static struct hostlist_file *RegisterHostlist_(struct hostlist_files_head *hostl
}
struct hostlist_file *RegisterHostlist(struct desync_profile *dp, bool bExclude, const char *filename)
{
if (!file_mod_time(filename))
{
DLOG_ERR("cannot access hostlist file '%s'\n",filename);
return NULL;
}
return RegisterHostlist_(
&params.hostlists,
bExclude ? &dp->hl_collection_exclude : &dp->hl_collection,