[or-cvs] r13957: Fix bug spotted by mwenge: a server_event should not be a se (in tor/trunk: . doc/spec src/or)

nickm at seul.org nickm at seul.org
Tue Mar 11 04:30:14 UTC 2008


Author: nickm
Date: 2008-03-11 00:30:14 -0400 (Tue, 11 Mar 2008)
New Revision: 13957

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/doc/spec/control-spec.txt
   tor/trunk/src/or/config.c
   tor/trunk/src/or/control.c
Log:
 r18723 at catbus:  nickm | 2008-03-11 00:25:30 -0400
 Fix bug spotted by mwenge: a server_event should not be a sever_event.  Also, fix compile errors in config.c and control.c with --enable-gcc-warnings.



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

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2008-03-11 04:30:11 UTC (rev 13956)
+++ tor/trunk/ChangeLog	2008-03-11 04:30:14 UTC (rev 13957)
@@ -7,6 +7,8 @@
       OpenSSL versions should have been working fine.  Diagnosis and patch
       from lodger, Karsten Loesing and Sebastian Hahn.  Fixes bug 616.
       Bugfix on 0.2.0.20-rc.
+    - Generate "STATUS_SERVER" events rather than misspelled "STATUS_SEVER"
+      events.  Caught by mwenge; bugfix on 0.1.2.x.
 
   o Minor features:
     - Allow separate log levels to be configured for different logging

Modified: tor/trunk/doc/spec/control-spec.txt
===================================================================
--- tor/trunk/doc/spec/control-spec.txt	2008-03-11 04:30:11 UTC (rev 13956)
+++ tor/trunk/doc/spec/control-spec.txt	2008-03-11 04:30:14 UTC (rev 13957)
@@ -1160,6 +1160,10 @@
      controllers.  These recommendations are suggestions only; no controller
      is required to implement them.
 
+  Compatibility node: versions of Tor before 0.2.0.22-rc incorrectly
+  generated "STATUS_SERVER" as "STATUS_SEVER".  To be compatible with those
+  versions, tools should accept both.
+
   Actions for STATUS_GENERAL events can be as follows:
 
      CLOCK_JUMPED

Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c	2008-03-11 04:30:11 UTC (rev 13956)
+++ tor/trunk/src/or/config.c	2008-03-11 04:30:14 UTC (rev 13957)
@@ -3530,7 +3530,7 @@
 }
 
 /** Learn config file name from command line arguments, or use the default */
-char *
+static char *
 find_torrc_filename(int argc, char **argv,
                     int *using_default_torrc, int *ignore_missing_torrc)
 {
@@ -3581,7 +3581,7 @@
 }
 
 /** Load torrc from disk, setting torrc_fname if successful */
-char *
+static char *
 load_torrc_from_disk(int argc, char **argv)
 {
   char *fname=NULL;

Modified: tor/trunk/src/or/control.c
===================================================================
--- tor/trunk/src/or/control.c	2008-03-11 04:30:11 UTC (rev 13956)
+++ tor/trunk/src/or/control.c	2008-03-11 04:30:14 UTC (rev 13957)
@@ -871,7 +871,8 @@
 {
   int retval;
   char *errstring = NULL;
-  char *msg = NULL;
+  const char *msg = NULL;
+  (void) len;
 
   retval = options_init_from_string(body, CMD_RUN_TOR, NULL, &errstring);
 
@@ -3629,7 +3630,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