From 39265dd72e9285ea61a0d2a16d7e80050ced546e Mon Sep 17 00:00:00 2001
From: Nick Mathewson
Date: Fri, 9 Dec 2005 05:37:26 +0000
Subject: [PATCH] In my private little universe, terminals are still 80
columns. Impose a 160-character-per-line limit; this will creep down.
svn:r5548
---
contrib/checkSpace.pl | 6 ++++++
src/or/buffers.c | 24 +++++++++++++++++++-----
src/or/config.c | 31 ++++++++++++++++++++++++-------
src/or/control.c | 9 +++++++--
src/or/directory.c | 15 ++++++++++++---
src/or/dirserv.c | 4 +++-
src/or/hibernate.c | 6 +++++-
src/or/main.c | 12 +++++++++---
src/or/routerlist.c | 8 ++++++--
9 files changed, 91 insertions(+), 24 deletions(-)
diff --git a/contrib/checkSpace.pl b/contrib/checkSpace.pl
index e0b9d6b93b..4b480e0f44 100755
--- a/contrib/checkSpace.pl
+++ b/contrib/checkSpace.pl
@@ -35,6 +35,12 @@ for $fn (@ARGV) {
} else {
$lastnil = 0;
}
+ ## Terminals are still 80 columns wide in my world. I refuse to
+ ## accept double-line lines.
+ if (/^.{160}/) {
+ print " Wide:$fn:$.\n";
+ }
+
### Juju to skip over comments and strings, since the tests
### we're about to do are okay there.
if ($C) {
diff --git a/src/or/buffers.c b/src/or/buffers.c
index ec447b291e..977a7d9a47 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -967,7 +967,12 @@ fetch_from_buf_socks(buf_t *buf, socks_request_t *req, int log_sockstype)
buf_remove_from_front(buf, 10);
if (!address_is_in_virtual_range(req->address) &&
!have_warned_about_unsafe_socks) {
- warn(LD_APP,"Your application (using socks5 on port %d) is giving Tor only an IP address. Applications that do DNS resolves themselves may leak information. Consider using Socks4A (e.g. via privoxy or socat) instead. For more information, please see http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#SOCKSAndDNS", req->port);
+ warn(LD_APP,"Your application (using socks5 on port %d) is giving "
+ "Tor only an IP address. Applications that do DNS resolves "
+ "themselves may leak information. Consider using Socks4A "
+ "(e.g. via privoxy or socat) instead. For more information, "
+ "please see http://wiki.noreply.org/noreply/TheOnionRouter/"
+ "TorFAQ#SOCKSAndDNS", req->port);
// have_warned_about_unsafe_socks = 1; // (for now, warn every time)
}
return 1;
@@ -986,7 +991,9 @@ fetch_from_buf_socks(buf_t *buf, socks_request_t *req, int log_sockstype)
req->port = ntohs(get_uint16(buf->cur+5+len));
buf_remove_from_front(buf, 5+len+2);
if (log_sockstype)
- notice(LD_APP, "Your application (using socks5 on port %d) gave Tor a hostname, which means Tor will do the DNS resolve for you. This is good.", req->port);
+ notice(LD_APP, "Your application (using socks5 on port %d) gave "
+ "Tor a hostname, which means Tor will do the DNS resolve "
+ "for you. This is good.", req->port);
return 1;
default: /* unsupported */
warn(LD_APP,"socks5: unsupported address type %d. Rejecting.",*(buf->cur+3));
@@ -1041,7 +1048,10 @@ fetch_from_buf_socks(buf_t *buf, socks_request_t *req, int log_sockstype)
if (socks4_prot != socks4a &&
!address_is_in_virtual_range(tmpbuf) &&
!have_warned_about_unsafe_socks) {
- warn(LD_APP,"Your application (using socks4 on port %d) is giving Tor only an IP address. Applications that do DNS resolves themselves may leak information. Consider using Socks4A (e.g. via privoxy or socat) instead.", req->port);
+ warn(LD_APP,"Your application (using socks4 on port %d) is giving Tor "
+ "only an IP address. Applications that do DNS resolves "
+ "themselves may leak information. Consider using Socks4A (e.g. "
+ "via privoxy or socat) instead.", req->port);
// have_warned_about_unsafe_socks = 1; // (for now, warn every time)
}
if (socks4_prot == socks4a) {
@@ -1061,7 +1071,9 @@ fetch_from_buf_socks(buf_t *buf, socks_request_t *req, int log_sockstype)
}
tor_assert(next < buf->cur+buf->datalen);
if (log_sockstype)
- notice(LD_APP, "Your application (using socks4a on port %d) gave Tor a hostname, which means Tor will do the DNS resolve for you. This is good.", req->port);
+ notice(LD_APP, "Your application (using socks4a on port %d) gave "
+ "Tor a hostname, which means Tor will do the DNS resolve "
+ "for you. This is good.", req->port);
}
debug(LD_APP,"socks4: Everything is here. Success.");
strlcpy(req->address, startaddr ? startaddr : tmpbuf,
@@ -1089,7 +1101,9 @@ fetch_from_buf_socks(buf_t *buf, socks_request_t *req, int log_sockstype)
"
\n"
"\n"
"See http://tor.eff.org/documentation.html for more information.\n"
-"\n"
+"\n"
"
\n"
"