tpws,nfqws: autohostlist reread on modify

This commit is contained in:
bol-van
2024-03-23 22:57:05 +03:00
parent b6ec750879
commit 14428cd545
36 changed files with 123 additions and 21 deletions

View File

@@ -64,7 +64,7 @@ void tamper_out(t_ctrack *ctrack, uint8_t *segment,size_t segment_buffer_size,si
bHaveHost = true;
VPRINT("Requested Host is : %s", Host)
for(pc = Host; *pc; pc++) *pc=tolower(*pc);
bBypass = !HostlistCheck(params.hostlist, params.hostlist_exclude, Host, &bHostExcluded);
bBypass = !HostlistCheck(Host, &bHostExcluded);
}
if (!bBypass)
{
@@ -228,7 +228,7 @@ void tamper_out(t_ctrack *ctrack, uint8_t *segment,size_t segment_buffer_size,si
{
VPRINT("hostname: %s",Host)
bHaveHost = true;
bBypass = !HostlistCheck(params.hostlist, params.hostlist_exclude, Host, &bHostExcluded);
bBypass = !HostlistCheck(Host, &bHostExcluded);
}
if (bBypass)
{
@@ -307,7 +307,7 @@ static void auto_hostlist_failed(const char *hostname)
VPRINT("auto hostlist : rechecking %s to avoid duplicates", hostname);
bool bExcluded=false;
if (!HostlistCheck(params.hostlist, params.hostlist_exclude, hostname, &bExcluded) && !bExcluded)
if (!HostlistCheck(hostname, &bExcluded) && !bExcluded)
{
VPRINT("auto hostlist : adding %s", hostname);
HOSTLIST_DEBUGLOG_APPEND("%s : adding", hostname);
@@ -321,6 +321,7 @@ static void auto_hostlist_failed(const char *hostname)
perror("write to auto hostlist:");
return;
}
params.hostlist_auto_mod_time = file_mod_time(params.hostlist_auto_filename);
}
else
{