[or-cvs] r12171: Fix windows mmap changes. (in tor/trunk: . doc src/common)

nickm at seul.org nickm at seul.org
Thu Oct 25 02:53:24 UTC 2007


Author: nickm
Date: 2007-10-24 22:53:24 -0400 (Wed, 24 Oct 2007)
New Revision: 12171

Modified:
   tor/trunk/
   tor/trunk/doc/TODO
   tor/trunk/src/common/compat.c
Log:
 r16128 at catbus:  nickm | 2007-10-24 22:52:16 -0400
 Fix windows mmap changes.



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

Modified: tor/trunk/doc/TODO
===================================================================
--- tor/trunk/doc/TODO	2007-10-25 02:22:04 UTC (rev 12170)
+++ tor/trunk/doc/TODO	2007-10-25 02:53:24 UTC (rev 12171)
@@ -84,10 +84,10 @@
       o Implement voting side
         o Set Named and Unnamed sensibly
         o Don't reject Unnamed routers.
-      . Implement consensus side
+      o Implement consensus side
         o Generic "pick which voting method to use" code.
         o When version 2 is set, set the Unnamed flag right.
-        - Mention (and admit to ourself) that we support method 2.
+        o Mention (and admit to ourself) that we support method 2.
       o Implement client side
 
   - Refactoring:

Modified: tor/trunk/src/common/compat.c
===================================================================
--- tor/trunk/src/common/compat.c	2007-10-25 02:22:04 UTC (rev 12170)
+++ tor/trunk/src/common/compat.c	2007-10-25 02:53:24 UTC (rev 12171)
@@ -250,11 +250,11 @@
     char *msg = format_win32_error(e);
     log_fn(severity, LD_FS, "Couldn't mmap file \"%s\": %s", filename, msg);
     tor_free(msg);
+    if (e == ERROR_FILE_NOT_FOUND || e == ERROR_PATH_NOT_FOUND)
+      errno = ENOENT;
+    else
+      errno = EINVAL;
   }
-  if (e == ERROR_FILE_NOT_FOUND || e == ERROR_PATH_NOT_FOUND)
-    e = ENOENT;
-  else
-    e = EINVAL;
  err:
   if (empty)
     errno = ERANGE;



More information about the tor-commits mailing list