[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Bugfix: looks like clients since 0.1.1.10-alpha have been



Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or

Modified Files:
	main.c 
Log Message:
Bugfix: looks like clients since 0.1.1.10-alpha have been
expiring connections whenever 5 minutes pass and they *do*
have circuits on them.


Index: main.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.635
retrieving revision 1.636
diff -u -p -d -r1.635 -r1.636
--- main.c	19 Mar 2006 03:55:48 -0000	1.635
+++ main.c	21 Mar 2006 21:58:00 -0000	1.636
@@ -675,7 +675,7 @@ run_connection_housekeeping(int i, time_
     }
   }
 
-  if (conn->is_obsolete && conn->n_circuits == 0) {
+  if (conn->is_obsolete && !conn->n_circuits) {
     /* no unmarked circs -- mark it now */
     log_info(LD_OR,
              "Expiring non-used OR connection to fd %d (%s:%d) [Obsolete].",
@@ -694,14 +694,14 @@ run_connection_housekeeping(int i, time_
                conn->s,conn->address, conn->port);
       connection_mark_for_close(conn);
       conn->hold_open_until_flushed = 1;
-    } else if (we_are_hibernating() && conn->n_circuits == 0 &&
+    } else if (we_are_hibernating() && !conn->n_circuits &&
                !buf_datalen(conn->outbuf)) {
       log_info(LD_OR,"Expiring non-used OR connection to fd %d (%s:%d) "
                "[Hibernating or exiting].",
                conn->s,conn->address, conn->port);
       connection_mark_for_close(conn);
       conn->hold_open_until_flushed = 1;
-    } else if (!clique_mode(options) && conn->n_circuits &&
+    } else if (!clique_mode(options) && !conn->n_circuits &&
                (!router || !server_mode(options) ||
                 !router_is_clique_mode(router))) {
       log_info(LD_OR,"Expiring non-used OR connection to fd %d (%s:%d) "