Forráskód Böngészése

bugfixes

svn:r818
Roger Dingledine 21 éve
szülő
commit
5e81e4748e
3 módosított fájl, 8 hozzáadás és 7 törlés
  1. 2 1
      src/or/connection_edge.c
  2. 1 1
      src/or/onion.c
  3. 5 5
      src/or/or.h

+ 2 - 1
src/or/connection_edge.c

@@ -579,7 +579,8 @@ static int connection_ap_handshake_attach_circuit(connection_t *conn) {
 
   connection_start_reading(conn);
 
-  circ->timestamp_dirty = time(NULL);
+  if(!circ->timestamp_dirty)
+    circ->timestamp_dirty = time(NULL);
 
   /* add it into the linked list of streams on this circuit */
   log_fn(LOG_DEBUG,"attaching new conn to circ. n_circ_id %d.", circ->n_circ_id);

+ 1 - 1
src/or/onion.c

@@ -272,7 +272,7 @@ static routerinfo_t *choose_good_exit_server(directory_t *dir)
       ++n_best_maybe_support;
     }
   }
-  log_fn(LOG_WARN, "Found %d servers that will definitely support %d/%d pending connections, and %d that might support %d/%d.",
+  log_fn(LOG_INFO, "Found %d servers that will definitely support %d/%d pending connections, and %d that might support %d/%d.",
          n_best_support, best_support, n_pending_connections,
          n_best_maybe_support, best_maybe_support, n_pending_connections);
   if (best_support) {

+ 5 - 5
src/or/or.h

@@ -273,13 +273,13 @@ struct connection_t {
 
   buf_t *inbuf;
   int inbuf_reached_eof; /* did read() return 0 on this conn? */
-  long timestamp_lastread; /* when was the last time poll() said we could read? */
+  time_t timestamp_lastread; /* when was the last time poll() said we could read? */
 
   buf_t *outbuf;
   int outbuf_flushlen; /* how much data should we try to flush from the outbuf? */
-  long timestamp_lastwritten; /* when was the last time poll() said we could write? */
+  time_t timestamp_lastwritten; /* when was the last time poll() said we could write? */
 
-  long timestamp_created; /* when was this connection_t created? */
+  time_t timestamp_created; /* when was this connection_t created? */
 
   uint32_t addr; /* these two uniquely identify a router. Both in host order. */
   uint16_t port; /* if non-zero, they identify the guy on the other end
@@ -418,8 +418,8 @@ struct circuit_t {
   crypt_path_t *cpath;
 
   char onionskin[DH_ONIONSKIN_LEN]; /* for storage while onionskin pending */
-  long timestamp_created;
-  long timestamp_dirty; /* when the circuit was first used, or 0 if clean */
+  time_t timestamp_created;
+  time_t timestamp_dirty; /* when the circuit was first used, or 0 if clean */
 
   uint8_t state;