Add conf-file option.

Luci add custom.conf
Bugfix for timer
Update address matching.
This commit is contained in:
Nick Peng
2018-08-09 00:00:27 +08:00
parent 49510c9145
commit 56a273e3ed
12 changed files with 99 additions and 23 deletions

View File

@@ -182,11 +182,11 @@ int smartdns_init(void)
char logname[DNS_MAX_PATH];
if (dns_conf_log_file[0] != 0) {
strncpy(logdir, dns_conf_log_file, DNS_MAX_PATH);
strncpy(logname, dns_conf_log_file, DNS_MAX_PATH);
dirname(logdir);
basename(logname);
char dns_log_file[DNS_MAX_PATH];
strncpy(dns_log_file, dns_conf_log_file, DNS_MAX_PATH);
strncpy(logdir, dirname(dns_log_file), DNS_MAX_PATH);
strncpy(dns_log_file, dns_conf_log_file, DNS_MAX_PATH);
strncpy(logname, basename(dns_log_file), DNS_MAX_PATH);
} else {
strncpy(logdir, SMARTDNS_LOG_PATH, DNS_MAX_PATH);
strncpy(logname, SMARTDNS_LOG_FILE, DNS_MAX_PATH);