summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-03-11 04:30:14 +0000
committerNick Mathewson <nickm@torproject.org>2008-03-11 04:30:14 +0000
commit8b24e01599f2838ace5a0995acf575711f067f1c (patch)
tree4886c6bf3c5435160d2bf4cc617857846bfa542d
parentd6507fb510dc40205523448c03fb8c6fca3ed8db (diff)
downloadtor-8b24e01599f2838ace5a0995acf575711f067f1c.tar.gz
tor-8b24e01599f2838ace5a0995acf575711f067f1c.zip
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
-rw-r--r--ChangeLog2
-rw-r--r--doc/spec/control-spec.txt4
-rw-r--r--src/or/config.c4
-rw-r--r--src/or/control.c5
4 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index ccae6a855e..bd2d2be933 100644
--- a/ChangeLog
+++ b/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
diff --git a/doc/spec/control-spec.txt b/doc/spec/control-spec.txt
index 0ab794d6ec..6c0379b50a 100644
--- a/doc/spec/control-spec.txt
+++ b/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
diff --git a/src/or/config.c b/src/or/config.c
index acdf4c2291..cdddd3c4fc 100644
--- a/src/or/config.c
+++ b/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;
diff --git a/src/or/control.c b/src/or/control.c
index 2dcac977c5..c126e5df9c 100644
--- a/src/or/control.c
+++ b/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);