[or-cvs] r8802: implement a few status events, so we can make sure they work (in tor/trunk: doc src/or)
arma at seul.org
arma at seul.org
Mon Oct 23 05:51:52 UTC 2006
Author: arma
Date: 2006-10-23 01:51:46 -0400 (Mon, 23 Oct 2006)
New Revision: 8802
Modified:
tor/trunk/doc/TODO
tor/trunk/doc/control-spec.txt
tor/trunk/src/or/circuitbuild.c
tor/trunk/src/or/control.c
tor/trunk/src/or/main.c
Log:
implement a few status events, so we can make sure they work,
and so vidalia can start handling them if it wants.
Modified: tor/trunk/doc/TODO
===================================================================
--- tor/trunk/doc/TODO 2006-10-23 05:36:56 UTC (rev 8801)
+++ tor/trunk/doc/TODO 2006-10-23 05:51:46 UTC (rev 8802)
@@ -278,6 +278,7 @@
- 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.
Modified: tor/trunk/doc/control-spec.txt
===================================================================
--- tor/trunk/doc/control-spec.txt 2006-10-23 05:36:56 UTC (rev 8801)
+++ tor/trunk/doc/control-spec.txt 2006-10-23 05:51:46 UTC (rev 8802)
@@ -938,13 +938,19 @@
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 @@
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
Modified: tor/trunk/src/or/circuitbuild.c
===================================================================
--- tor/trunk/src/or/circuitbuild.c 2006-10-23 05:36:56 UTC (rev 8801)
+++ tor/trunk/src/or/circuitbuild.c 2006-10-23 05:51:46 UTC (rev 8802)
@@ -608,6 +608,7 @@
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);
Modified: tor/trunk/src/or/control.c
===================================================================
--- tor/trunk/src/or/control.c 2006-10-23 05:36:56 UTC (rev 8801)
+++ tor/trunk/src/or/control.c 2006-10-23 05:51:46 UTC (rev 8802)
@@ -2420,7 +2420,7 @@
/* 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",
Modified: tor/trunk/src/or/main.c
===================================================================
--- tor/trunk/src/or/main.c 2006-10-23 05:36:56 UTC (rev 8801)
+++ tor/trunk/src/or/main.c 2006-10-23 05:51:46 UTC (rev 8802)
@@ -140,6 +140,8 @@
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;
}
More information about the tor-commits
mailing list