Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Goulet
Tor
Commits
4a5586b8
Commit
4a5586b8
authored
Mar 28, 2004
by
Roger Dingledine
Browse files
make dns resolves a lot faster
(but only enable this once we've found the bug) svn:r1358
parent
2ba9901c
Changes
1
Show whitespace changes
Inline
Side-by-side
src/or/dns.c
View file @
4a5586b8
...
...
@@ -109,11 +109,21 @@ int dns_resolve(connection_t *exitconn) {
struct
cached_resolve
*
resolve
;
struct
cached_resolve
search
;
struct
pending_connection_t
*
pending_connection
;
struct
in_addr
in
;
uint32_t
now
=
time
(
NULL
);
assert_connection_ok
(
exitconn
,
0
);
/* first take this opportunity to see if there are any expired
resolves in the tree.*/
#if 0 /* only enable this once we've found the conn-munging bug */
/* first check if exitconn->address is an IP. If so, we already
* know the answer. */
if (tor_inet_aton(exitconn->address, &in) != 0) {
exitconn->addr = ntohl(in.s_addr);
return 1;
}
#endif
/* then take this opportunity to see if there are any expired
* resolves in the tree. */
purge_expired_resolves
(
now
);
/* now check the tree to see if 'address' is already there. */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment