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

@@ -6,6 +6,7 @@
#include <unistd.h>
#include <ctype.h>
#include <time.h>
#include <sys/stat.h>
void hexdump_limited_dlog(const uint8_t *data, size_t size, size_t limit)
{
@@ -256,3 +257,9 @@ int fprint_localtime(FILE *F)
localtime_r(&now,&t);
return fprintf(F, "%02d.%02d.%04d %02d:%02d:%02d", t.tm_mday, t.tm_mon + 1, t.tm_year + 1900, t.tm_hour, t.tm_min, t.tm_sec);
}
time_t file_mod_time(const char *filename)
{
struct stat st;
return stat(filename,&st)==-1 ? 0 : st.st_mtime;
}