[or-cvs] Resolve FIXME items: make the kill-unattached-AP timeout sy...

Nick Mathewson nickm at seul.org
Wed Nov 10 14:28:50 UTC 2004


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv32723/src/or

Modified Files:
	circuituse.c 
Log Message:
Resolve FIXME items: make the kill-unattached-AP timeout symbolic

Index: circuituse.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuituse.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- circuituse.c	7 Nov 2004 01:33:05 -0000	1.22
+++ circuituse.c	10 Nov 2004 14:28:47 -0000	1.23
@@ -11,6 +11,9 @@
 
 #include "or.h"
 
+/** Longest time to wait for a circuit before closing an AP connection */
+#define CONN_AP_MAX_ATTACH_DELAY 60
+
 /********* START VARIABLES **********/
 
 extern circuit_t *global_circuitlist; /* from circuitlist.c */
@@ -764,8 +767,7 @@
   tor_assert(conn->socks_request);
 
   conn_age = time(NULL) - conn->timestamp_created;
-  if(conn_age > 60) {
-    /* XXX make this cleaner than '60' */
+  if(conn_age > CONN_AP_MAX_ATTACH_DELAY) {
     log_fn(LOG_WARN,"Giving up on unattached conn (%d sec old).", conn_age);
     return -1;
   }



More information about the tor-commits mailing list