Compare commits
2 Commits
Release41-
...
Release41-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ca4c92c9f | ||
|
|
e3271b07c4 |
@@ -447,7 +447,7 @@ errout:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* check whether server exists */
|
/* check whether server exists */
|
||||||
static int _dns_client_server_exist(const char *server_ip, int port, dns_server_type_t server_type)
|
static int _dns_client_server_exist(const char *server_ip, int port, dns_server_type_t server_type, struct client_dns_server_flags *flags)
|
||||||
{
|
{
|
||||||
struct dns_server_info *server_info = NULL;
|
struct dns_server_info *server_info = NULL;
|
||||||
struct dns_server_info *tmp = NULL;
|
struct dns_server_info *tmp = NULL;
|
||||||
@@ -458,6 +458,10 @@ static int _dns_client_server_exist(const char *server_ip, int port, dns_server_
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (memcmp(&server_info->flags, flags, sizeof(*flags)) == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (strncmp(server_info->ip, server_ip, DNS_HOSTNAME_LEN) != 0) {
|
if (strncmp(server_info->ip, server_ip, DNS_HOSTNAME_LEN) != 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -1029,7 +1033,7 @@ static int _dns_client_server_add(char *server_ip, char *server_host, int port,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* if server exist, return */
|
/* if server exist, return */
|
||||||
if (_dns_client_server_exist(server_ip, port, server_type) == 0) {
|
if (_dns_client_server_exist(server_ip, port, server_type, flags) == 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1050,7 +1050,7 @@ static int _tlog_archive_log_compressed(struct tlog_log *log)
|
|||||||
int pid = vfork();
|
int pid = vfork();
|
||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
_tlog_close_all_fd();
|
_tlog_close_all_fd();
|
||||||
execl(tlog.gzip_cmd, "-1", pending_file, NULL);
|
execl(tlog.gzip_cmd, tlog.gzip_cmd, "-1", pending_file, NULL);
|
||||||
_exit(1);
|
_exit(1);
|
||||||
} else if (pid < 0) {
|
} else if (pid < 0) {
|
||||||
goto errout;
|
goto errout;
|
||||||
|
|||||||
Reference in New Issue
Block a user