Browse Source

r18723@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.


svn:r13957

Nick Mathewson 16 years ago
parent
commit
8b24e01599
4 changed files with 11 additions and 4 deletions
  1. 2 0
      ChangeLog
  2. 4 0
      doc/spec/control-spec.txt
  3. 2 2
      src/or/config.c
  4. 3 2
      src/or/control.c

+ 2 - 0
ChangeLog

@@ -7,6 +7,8 @@ Changes in version 0.2.1.1-alpha - 2008-??-??
       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

+ 4 - 0
doc/spec/control-spec.txt

@@ -1160,6 +1160,10 @@ $Id$
      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

+ 2 - 2
src/or/config.c

@@ -3530,7 +3530,7 @@ check_nickname_list(const char *lst, const char *name, char **msg)
 }
 
 /** 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 @@ find_torrc_filename(int argc, char **argv,
 }
 
 /** Load torrc from disk, setting torrc_fname if successful */
-char *
+static char *
 load_torrc_from_disk(int argc, char **argv)
 {
   char *fname=NULL;

+ 3 - 2
src/or/control.c

@@ -871,7 +871,8 @@ handle_control_loadconf(control_connection_t *conn, uint32_t len,
 {
   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 @@ control_event_status(int type, int severity, const char *format, va_list args)
       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);