summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-10-23 05:51:46 +0000
committerRoger Dingledine <arma@torproject.org>2006-10-23 05:51:46 +0000
commit2a1c2947172998278e38050f17ad4857079e17e7 (patch)
treea182e4ac1be32a0b553ba6a624b933ab20195343
parentc804eea39dd91cdbeacba5698adafc0295a949bb (diff)
downloadtor-2a1c2947172998278e38050f17ad4857079e17e7.tar.gz
tor-2a1c2947172998278e38050f17ad4857079e17e7.zip
implement a few status events, so we can make sure they work,
and so vidalia can start handling them if it wants. svn:r8802
-rw-r--r--doc/TODO1
-rw-r--r--doc/control-spec.txt12
-rw-r--r--src/or/circuitbuild.c1
-rw-r--r--src/or/control.c2
-rw-r--r--src/or/main.c2
5 files changed, 14 insertions, 4 deletions
diff --git a/doc/TODO b/doc/TODO
index 8a77e95553..1d4b8367a1 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -278,6 +278,7 @@ d - Write limiting; separate token bucket for write
- Implement
Minor items for 0.1.2.x as time permits:
+ - don't do dns hijacking tests if we're reject *:* exit policy?
o Some way for the authorities to set BadExit for some nodes manually.
- When we export something from foo.c file for testing purposes only,
make a foo_test.h file for test.c to include.
diff --git a/doc/control-spec.txt b/doc/control-spec.txt
index 8ded5448e4..0c260c6d3d 100644
--- a/doc/control-spec.txt
+++ b/doc/control-spec.txt
@@ -938,13 +938,19 @@ $Id$
Type = "STATUS_GENERAL" / "STATUS_CLIENT" / "STATUS_SERVER"
Severity = "NOTICE" / "WARN" / "ERR"
- Action is a string, and Arguments is a series of key=value
+ Action is a string, and Arguments is a series of keyword=value
pairs on the same line.
+ Controllers who listen to these events will be assumed to want
+ both EXTENDED_EVENTS and VERBOSE_NAMES; see the USEFEATURE command
+ for details.
+
+[
The reserved keyword "message" can optionally be used to provide a
string describing the nature of the action. Message strings MUST
NOT include items that a controller might be tempted to parse,
such as numbers.
+no plans to use this yet -RD]
Actions for STATUS_GENERAL severity NOTICE events can be as follows:
@@ -969,10 +975,10 @@ $Id$
since we don't really know what the user should do anyway. Hm.]
TOO_MANY_CONNECTIONS
- "limit=NUM"
+ "current=NUM"
Tor has reached its ulimit -n or whatever the native limit is on
file descriptors or sockets. The user should really do something
- about this. The "limit" argument shows the number of connections
+ about this. The "current" argument shows the number of connections
currently open.
BUG
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 239c4e198c..3b33bdfba7 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -608,6 +608,7 @@ circuit_send_next_onion_skin(origin_circuit_t *circ)
log(LOG_NOTICE, LD_GENERAL,
"Tor has successfully opened a circuit. "
"Looks like client functionality is working.");
+ control_event_client_status(LOG_NOTICE, "CIRCUIT_ESTABLISHED");
if (server_mode(options) && !check_whether_orport_reachable()) {
inform_testing_reachability();
consider_testing_reachability(1, 1);
diff --git a/src/or/control.c b/src/or/control.c
index 502c38a6c0..8d099ffc87 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -2420,7 +2420,7 @@ handle_control_usefeature(control_connection_t *conn,
/* remove this in 0.1.2.4; EXTENDED_FORMAT only ever worked for a
* little while during 0.1.2.2-alpha-dev. */
log_warn(LD_GENERAL,
- "EXTENDED_FORMAT is deprecated; use EXTENDED_EVENTS instead.");
+ "EXTENDED_FORMAT is deprecated; use EXTENDED_EVENTS instead.");
extended_events = 1;
} else {
connection_printf_to_buf(conn, "552 Unrecognized feature \"%s\"\r\n",
diff --git a/src/or/main.c b/src/or/main.c
index b51028ca80..87dd579b21 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -140,6 +140,8 @@ connection_add(connection_t *conn)
if (n_conns >= get_options()->_ConnLimit-1) {
log_warn(LD_NET,"Failing because we have %d connections already. Please "
"raise your ulimit -n.", n_conns);
+ control_event_general_status(LOG_WARN, "TOO_MANY_CONNECTIONS CURRENT=%d",
+ n_conns);
return -1;
}