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
9a557007
Commit
9a557007
authored
Feb 28, 2004
by
Roger Dingledine
Browse files
add a log_warn to notify us of yet another potential dns.c bug
svn:r1167
parent
833d1424
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/or/dns.c
View file @
9a557007
...
@@ -76,6 +76,12 @@ static void purge_expired_resolves(uint32_t now) {
...
@@ -76,6 +76,12 @@ static void purge_expired_resolves(uint32_t now) {
while
(
oldest_cached_resolve
&&
(
oldest_cached_resolve
->
expire
<
now
))
{
while
(
oldest_cached_resolve
&&
(
oldest_cached_resolve
->
expire
<
now
))
{
resolve
=
oldest_cached_resolve
;
resolve
=
oldest_cached_resolve
;
log
(
LOG_DEBUG
,
"Forgetting old cached resolve (expires %lu)"
,
(
unsigned
long
)
resolve
->
expire
);
log
(
LOG_DEBUG
,
"Forgetting old cached resolve (expires %lu)"
,
(
unsigned
long
)
resolve
->
expire
);
if
(
resolve
->
state
==
CACHE_STATE_PENDING
)
{
log_fn
(
LOG_WARN
,
"Expiring a dns resolve that's still pending. Forgot to cull it?"
);
/* XXX if resolve->pending_connections is used, then we're probably
* introducing bugs by closing resolve without notifying those streams.
*/
}
oldest_cached_resolve
=
resolve
->
next
;
oldest_cached_resolve
=
resolve
->
next
;
if
(
!
oldest_cached_resolve
)
/* if there are no more, */
if
(
!
oldest_cached_resolve
)
/* if there are no more, */
newest_cached_resolve
=
NULL
;
/* then make sure the list's tail knows that too */
newest_cached_resolve
=
NULL
;
/* then make sure the list's tail knows that too */
...
...
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