Skip to content
Snippets Groups Projects
Commit cc640c09 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Reorder the trash can auto-filter keys and de-dupe the "<no name>" hosts

parent 8fbfcd9c
No related branches found
No related tags found
No related merge requests found
Pipeline #5007 failed
......@@ -158,12 +158,12 @@ BOOL filter_ip(scfg_t* cfg, const char* prot, const char* reason, const char* ho
,time_to_isoDateTimeStr(now, xpTimeZone_local(), tstr, sizeof tstr)
,prot
,reason);
if(host!=NULL)
if(duration)
fprintf(fp,"\te=%s", time_to_isoDateTimeStr(time(NULL) + duration, xpTimeZone_local(), tstr, sizeof tstr));
if(host!=NULL && strcmp(host, STR_NO_HOSTNAME) != 0)
fprintf(fp,"\th=%s", host);
if(username!=NULL)
fprintf(fp,"\tu=%s", username);
if(duration)
fprintf(fp,"\te=%s", time_to_isoDateTimeStr(time(NULL) + duration, xpTimeZone_local(), tstr, sizeof tstr));
fputc('\n', fp);
fclose(fp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment