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

[or-cvs] r10148: [Backport candidate] On windows, open cached-routers with th (in tor/trunk: . src/common)



Author: nickm
Date: 2007-05-09 17:22:56 -0400 (Wed, 09 May 2007)
New Revision: 10148

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/src/common/compat.c
Log:
 r12700@catbus:  nickm | 2007-05-09 17:22:53 -0400
 [Backport candidate] On windows, open cached-routers with the sharing mode "FILE_SHARE_READ so that other processes can read it while Tor is running. (Reported by Janbar). 



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r12700] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-05-09 16:36:33 UTC (rev 10147)
+++ tor/trunk/ChangeLog	2007-05-09 21:22:56 UTC (rev 10148)
@@ -113,6 +113,8 @@
     - Add even more asserts to hunt down bug 417.
     - When we are reporting the DirServer line we just parsed, we were
       logging the second stanza of the key fingerprint, not the first.
+    - On Windows, we were preventing other processes from reading
+      cached-routers while Tor was running.  (Reported by janbar)
 
   o Minor bugfixes (controller), reported by daejees:
     - Make 'getinfo fingerprint' return a 551 error if we're not a

Modified: tor/trunk/src/common/compat.c
===================================================================
--- tor/trunk/src/common/compat.c	2007-05-09 16:36:33 UTC (rev 10147)
+++ tor/trunk/src/common/compat.c	2007-05-09 21:22:56 UTC (rev 10148)
@@ -199,8 +199,8 @@
   res->mmap_handle = NULL;
 
   res->file_handle = CreateFile(filename,
-                                GENERIC_READ,
-                                0, NULL,
+                                GENERIC_READ, FILE_SHARE_READ,
+                                NULL,
                                 OPEN_EXISTING,
                                 FILE_ATTRIBUTE_NORMAL,
                                 0);