[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] add a log_warn to notify us of yet another potential dns.c ...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] add a log_warn to notify us of yet another potential dns.c ...
- From: arma@seul.org (Roger Dingledine)
- Date: Sat, 28 Feb 2004 17:14:00 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sat, 28 Feb 2004 17:14:15 -0500
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
dns.c
Log Message:
add a log_warn to notify us of yet another potential dns.c bug
Index: dns.c
===================================================================
RCS file: /home/or/cvsroot/src/or/dns.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- dns.c 28 Feb 2004 22:06:59 -0000 1.57
+++ dns.c 28 Feb 2004 22:13:58 -0000 1.58
@@ -76,6 +76,12 @@
while(oldest_cached_resolve && (oldest_cached_resolve->expire < now)) {
resolve = oldest_cached_resolve;
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;
if(!oldest_cached_resolve) /* if there are no more, */
newest_cached_resolve = NULL; /* then make sure the list's tail knows that too */