-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
527 additions
and
302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,17 @@ | ||
From 404c424fa8dbc34a4273b5ad54b15091efa5d4b4 Mon Sep 17 00:00:00 2001 | ||
From aae68815b58e9dadb2627c3dd268cf81ed53d41d Mon Sep 17 00:00:00 2001 | ||
From: Jian Chang <[email protected]> | ||
Date: Sat, 7 Nov 2015 10:07:14 +0800 | ||
Subject: [PATCH 1/2] shorten timeout | ||
Date: Thu, 12 Nov 2015 14:30:22 +0800 | ||
Subject: [PATCH 1/3] shorten timeout | ||
|
||
--- | ||
src/chinadns.c | 11 ++++------- | ||
1 file changed, 4 insertions(+), 7 deletions(-) | ||
src/chinadns.c | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/chinadns.c b/src/chinadns.c | ||
index 6716554..930e6de 100644 | ||
index 6716554..cab6bdd 100644 | ||
--- a/src/chinadns.c | ||
+++ b/src/chinadns.c | ||
@@ -159,8 +159,7 @@ static void usage(void); | ||
#ifdef DEBUG | ||
#define DLOG(s...) LOG(s) | ||
void __gcov_flush(void); | ||
-static void gcov_handler(int signum) | ||
-{ | ||
+static void gcov_handler(int signum) { | ||
__gcov_flush(); | ||
exit(1); | ||
} | ||
@@ -199,8 +198,8 @@ int main(int argc, char **argv) { | ||
@@ -199,8 +199,8 @@ int main(int argc, char **argv) { | ||
FD_SET(remote_sock, &readset); | ||
FD_SET(remote_sock, &errorset); | ||
struct timeval timeout = { | ||
|
@@ -32,21 +22,6 @@ index 6716554..930e6de 100644 | |
}; | ||
if (-1 == select(max_fd, &readset, NULL, &errorset, &timeout)) { | ||
ERR("select"); | ||
@@ -628,7 +627,7 @@ static void dns_handle_local() { | ||
dns_server_addrs[i].addrlen)) | ||
ERR("sendto"); | ||
} | ||
- for (i = has_chn_dns; i < dns_servers_len; i++) { | ||
+ for (i = has_chn_dns; i < dns_servers_len; i++) { | ||
if (-1 == sendto(remote_sock, compression_buf, len + 1, 0, | ||
dns_server_addrs[i].addr, | ||
dns_server_addrs[i].addrlen)) | ||
@@ -914,5 +913,3 @@ Forward DNS requests.\n\ | ||
\n\ | ||
Online help: <https://github.com/clowwindy/ChinaDNS>\n"); | ||
} | ||
- | ||
- | ||
-- | ||
2.6.2.windows.1 | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.