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

[or-cvs] That dir_refresh_src fix will only work if I enable it.



Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv9137/src/or

Modified Files:
	directory.c 
Log Message:
That dir_refresh_src fix will only work if I enable it.

Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/directory.c,v
retrieving revision 1.377
retrieving revision 1.378
diff -u -p -d -r1.377 -r1.378
--- directory.c	18 Jun 2006 08:07:16 -0000	1.377
+++ directory.c	18 Jun 2006 08:13:45 -0000	1.378
@@ -1418,6 +1418,7 @@ directory_handle_command_get(connection_
     ++d->refcnt;
 
     /* Prime the connection with some data. */
+    conn->dir_refresh_src = DIR_REFRESH_CACHED_DIR;
     connection_dirserv_flushed_some(conn);
     return 0;
   }
@@ -1544,6 +1545,10 @@ directory_handle_command_get(connection_
         connection_write_to_buf(tmp, strlen(tmp), conn);
       }
       /* Prime the connection with some data. */
+      if (!strcmpstart(url, "/tor/server/d/"))
+        conn->dir_refresh_src = DIR_REFRESH_SERVER_BY_DIGEST;
+      else
+        conn->dir_refresh_src = DIR_REFRESH_SERVER_BY_FP;
       connection_dirserv_flushed_some(conn);
     }
     return 0;