[or-cvs] r14104: Backport to 0.1.2: Detect errors from directory listing corr (in tor/branches/tor-0_1_2-patches: . src/common src/or)

nickm at seul.org nickm at seul.org
Tue Mar 18 16:09:08 UTC 2008


Author: nickm
Date: 2008-03-18 12:09:07 -0400 (Tue, 18 Mar 2008)
New Revision: 14104

Modified:
   tor/branches/tor-0_1_2-patches/
   tor/branches/tor-0_1_2-patches/ChangeLog
   tor/branches/tor-0_1_2-patches/src/common/util.c
   tor/branches/tor-0_1_2-patches/src/or/control.c
Log:
 r18931 at catbus:  nickm | 2008-03-18 12:08:44 -0400
 Backport to 0.1.2: Detect errors from directory listing correctly on win32.  Bug found by lodger.



Property changes on: tor/branches/tor-0_1_2-patches
___________________________________________________________________
 svk:merge ticket from /tor/012 [r18931] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/branches/tor-0_1_2-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_1_2-patches/ChangeLog	2008-03-18 16:08:55 UTC (rev 14103)
+++ tor/branches/tor-0_1_2-patches/ChangeLog	2008-03-18 16:09:07 UTC (rev 14104)
@@ -1,4 +1,4 @@
-Changes in versino 0.1.2.20 - 2008-??-??
+Changes in version 0.1.2.20 - 2008-??-??
   o Major bugfixes:
     - Patch from "Andrew S. Lists" to catch when we contact a directory
       mirror at IP address X and he says we look like we're coming from
@@ -21,8 +21,9 @@
       cached-descriptors file. Patch by freddy77.
     - Detect size overflow in zlib code.
     - Fix a pointer error that kept us from reporting nameserver errors.
+    - On Windows, correctly detect errors when listing the contents of a
+      directory.  Fix from lodger.
 
-
 Changes in version 0.1.2.19 - 2008-01-17
   Tor 0.1.2.19 fixes a huge memory leak on exit relays, makes the default
   exit policy a little bit more conservative so it's safer to run an

Modified: tor/branches/tor-0_1_2-patches/src/common/util.c
===================================================================
--- tor/branches/tor-0_1_2-patches/src/common/util.c	2008-03-18 16:08:55 UTC (rev 14103)
+++ tor/branches/tor-0_1_2-patches/src/common/util.c	2008-03-18 16:09:07 UTC (rev 14104)
@@ -1607,7 +1607,7 @@
   size_t pattern_len = strlen(dirname)+16;
   pattern = tor_malloc(pattern_len);
   tor_snprintf(pattern, pattern_len, "%s\\*", dirname);
-  if (!(handle = FindFirstFile(pattern, &findData))) {
+  if (INVALID_HANDLE_VALUE == (handle = FindFirstFile(pattern, &findData))) {
     tor_free(pattern);
     return NULL;
   }

Modified: tor/branches/tor-0_1_2-patches/src/or/control.c
===================================================================
--- tor/branches/tor-0_1_2-patches/src/or/control.c	2008-03-18 16:08:55 UTC (rev 14103)
+++ tor/branches/tor-0_1_2-patches/src/or/control.c	2008-03-18 16:09:07 UTC (rev 14104)
@@ -3192,7 +3192,7 @@
       status = "STATUS_CLIENT";
       break;
     case EVENT_STATUS_SERVER:
-      status = "STATUS_SEVER";
+      status = "STATUS_SERVER";
       break;
     default:
       log_warn(LD_BUG, "Unrecognized status type %d", type);



More information about the tor-commits mailing list