Commit ec7e0546 authored by Nick Mathewson's avatar Nick Mathewson 🌉
Browse files

Spell-check Tor.

parent f0453c45
......@@ -244,7 +244,7 @@ fetching early. Normal users should leave it off.
\fBFetchHidServDescriptors \fR\fB0\fR|\fB1\fR\fP
If set to 0, Tor will never fetch any hidden service descriptors from
the rendezvous directories. This option is only useful if you're using
a Tor controller that handles hidserv fetches for you.
a Tor controller that handles hidden service fetches for you.
(Default: 1)
.LP
.TP
......@@ -264,31 +264,31 @@ script to enumerate Tor nodes that exit to certain addresses.
(Default: 0)
.LP
.TP
\fBHttpProxy\fR \fIhost\fR[:\fIport\fR]\fP
\fBHTTPProxy\fR \fIhost\fR[:\fIport\fR]\fP
Tor will make all its directory requests through this host:port
(or host:80 if port is not specified),
rather than connecting directly to any directory servers.
.LP
.TP
\fBHttpProxyAuthenticator\fR \fIusername:password\fP
If defined, Tor will use this username:password for Basic Http proxy
\fBHTTPProxyAuthenticator\fR \fIusername:password\fP
If defined, Tor will use this username:password for Basic HTTP proxy
authentication, as in RFC 2617. This is currently the only form of
Http proxy authentication that Tor supports; feel free to submit a
HTTP proxy authentication that Tor supports; feel free to submit a
patch if you want it to support others.
.LP
.TP
\fBHttpsProxy\fR \fIhost\fR[:\fIport\fR]\fP
\fBHTTPSProxy\fR \fIhost\fR[:\fIport\fR]\fP
Tor will make all its OR (SSL) connections through this host:port
(or host:443 if port is not specified), via HTTP CONNECT rather than
connecting directly to servers. You may want to set \fBFascistFirewall\fR
to restrict the set of ports you might try to connect to, if your Https
to restrict the set of ports you might try to connect to, if your HTTPS
proxy only allows connecting to certain ports.
.LP
.TP
\fBHttpsProxyAuthenticator\fR \fIusername:password\fP
If defined, Tor will use this username:password for Basic Https proxy
\fBHTTPSProxyAuthenticator\fR \fIusername:password\fP
If defined, Tor will use this username:password for Basic HTTPS proxy
authentication, as in RFC 2617. This is currently the only form of
Https proxy authentication that Tor supports; feel free to submit a
HTTPS proxy authentication that Tor supports; feel free to submit a
patch if you want it to support others.
.LP
.TP
......@@ -500,7 +500,7 @@ firewall allows connections to everything inside net 99, rejects port
Like \fBReachableAddresses\fP, a list of addresses and ports. Tor will obey
these restrictions when fetching directory information, using standard HTTP
GET requests. If not set explicitly then the value of \fBReachableAddresses\fP
is used. If \fBHttpProxy\fR is set then these connections will go through that
is used. If \fBHTTPProxy\fR is set then these connections will go through that
proxy.
.LP
.TP
......@@ -508,11 +508,11 @@ proxy.
Like \fBReachableAddresses\fP, a list of addresses and ports. Tor will obey
these restrictions when connecting to Onion Routers, using TLS/SSL. If not set
explicitly then the value of \fBReachableAddresses\fP is used. If
\fBHttpsProxy\fR is set then these connections will go through that proxy.
\fBHTTPSProxy\fR is set then these connections will go through that proxy.
The separation between \fBReachableORAddresses\fP and
\fBReachableDirAddresses\fP is only interesting when you are connecting through
proxies (see \fBHttpProxy\fR and \fBHttpsProxy\fR). Most proxies limit TLS
proxies (see \fBHTTPProxy\fR and \fBHTTPSProxy\fR). Most proxies limit TLS
connections (which Tor uses to connect to Onion Routers) to port 443, and some
limit HTTP GET requests (which Tor uses for fetching directory information) to
port 80.
......@@ -595,7 +595,7 @@ to hosts that match this value and attempt to
reuse the same exit node for each. If the value is prepended with a '.', it is
treated as matching an entire domain. If one of the values is just a '.', it
means match everything. This option is useful if you frequently connect to
sites that will expire all your authentication cookies (ie log you out) if
sites that will expire all your authentication cookies (i.e. log you out) if
your IP address changes. Note that this option does have the disadvantage of
making it more clear that a given history is
associated with a single user. However, most people who would wish to observe
......@@ -784,7 +784,7 @@ The following options are useful only for servers (that is, if \fBORPort\fP is n
.LP
.TP
\fBAddress \fR\fIaddress\fP
The IP address or fqdn of this server (e.g. moria.mit.edu). You can
The IP address or fully qualified domain name of this server (e.g. moria.mit.edu). You can
leave this unset, and Tor will guess your IP address.
.LP
.TP
......@@ -964,7 +964,7 @@ behalf of clients. (Defaults to use the system DNS configuration.)
\fBServerDNSAllowBrokenConfig \fR\fB0\fR|\fB1\fR\fP
If this option is false, Tor exits immediately if there are problems
parsing the system DNS configuration or connecting to nameservers.
Otherwise, Tor continues to periodically retry the system namesevers
Otherwise, Tor continues to periodically retry the system nameservers
until it eventually succeeds.
(Defaults to "1".)
.LP
......@@ -1045,7 +1045,7 @@ admins at tor-ops@freehaven.net if you think you should be a directory.
.LP
.TP
\fBDirPortFrontPage \fIFILENAME\fP
When this option is set, it takes an html file and publishes it as "/" on
When this option is set, it takes an HTML file and publishes it as "/" on
the DirPort. Now relay operators can provide a disclaimer without needing
to set up a separate webserver. There's a sample disclaimer in
contrib/tor-exit-notice.html.
......@@ -1201,14 +1201,14 @@ for publication by this authority.
\fBAuthDirListBadDirs \fR\fB0\fR|\fB1\fR\fP
Authoritative directories only. If set to 1, this directory has
some opinion about which nodes are unsuitable as directory caches. (Do not
set this to 1 unless you plan to list nonfunctioning directories as bad;
set this to 1 unless you plan to list non-functioning directories as bad;
otherwise, you are effectively voting in favor of every declared directory.)
.LP
.TP
\fBAuthDirListBadExits \fR\fB0\fR|\fB1\fR\fP
Authoritative directories only. If set to 1, this directory has
some opinion about which nodes are unsuitable as exit nodes. (Do not
set this to 1 unless you plan to list nonfunctioning exits as bad;
set this to 1 unless you plan to list non-functioning exits as bad;
otherwise, you are effectively voting in favor of every declared exit
as an exit.)
.LP
......@@ -1217,7 +1217,7 @@ as an exit.)
Authoritative directories only. If set to 1, the directory server
rejects all uploaded server descriptors that aren't explicitly listed
in the fingerprints file. This acts as a "panic button" if we get
Sybiled. (Default: 0)
with a Sybil attack. (Default: 0)
.LP
.TP
\fBAuthDirMaxServersPerAddr\fR \fINUM\fP
......
......@@ -465,7 +465,7 @@ tor_addr_to_reverse_lookup_name(char *out, size_t outlen,
*cp++ = "0123456789abcdef"[byte >> 4];
*cp++ = '.';
}
memcpy(cp, "ip6.arpa", 9); /* 8 characters plus nul */
memcpy(cp, "ip6.arpa", 9); /* 8 characters plus NUL */
return 0;
}
return -1;
......@@ -619,7 +619,7 @@ tor_addr_parse_mask_ports(const char *s, tor_addr_t *addr_out,
} else {
if (mask) {
log_warn(LD_GENERAL,
"Unexpected mask in addrss %s; rejecting", escaped(s));
"Unexpected mask in address %s; rejecting", escaped(s));
goto err;
}
}
......@@ -642,7 +642,7 @@ tor_addr_parse_mask_ports(const char *s, tor_addr_t *addr_out,
} else {
if (port) {
log_warn(LD_GENERAL,
"Unexpected ports in addrss %s; rejecting", escaped(s));
"Unexpected ports in address %s; rejecting", escaped(s));
goto err;
}
}
......@@ -654,9 +654,9 @@ tor_addr_parse_mask_ports(const char *s, tor_addr_t *addr_out,
return -1;
}
/** Determine whether an address is IPv4, either native or ipv4-mapped ipv6.
/** Determine whether an address is IPv4, either native or IPv4-mapped IPv6.
* Note that this is about representation only, as any decent stack will
* reject ipv4-mapped addresses received on the wire (and won't use them
* reject IPv4-mapped addresses received on the wire (and won't use them
* on the wire either).
*/
int
......@@ -766,11 +766,11 @@ tor_addr_copy(tor_addr_t *dest, const tor_addr_t *src)
/** Given two addresses <b>addr1</b> and <b>addr2</b>, return 0 if the two
* addresses are equivalent under the mask mbits, less than 0 if addr1
* preceeds addr2, and greater than 0 otherwise.
* precedes addr2, and greater than 0 otherwise.
*
* Different address families (IPv4 vs IPv6) are always considered unequal if
* <b>how</b> is CMP_EXACT; otherwise, IPv6-mapped IPv4 addresses are
* cosidered equivalent to their IPv4 equivalents.
* considered equivalent to their IPv4 equivalents.
*/
int
tor_addr_compare(const tor_addr_t *addr1, const tor_addr_t *addr2,
......@@ -1021,7 +1021,7 @@ tor_addr_port_parse(const char *s, tor_addr_t *addr_out, uint16_t *port_out)
}
/** Set *<b>addr</b> to the IP address (if any) of whatever interface
* connects to the internet. This address should only be used in checking
* connects to the Internet. This address should only be used in checking
* whether our address has changed. Return 0 on success, -1 on failure.
*/
int
......@@ -1039,7 +1039,7 @@ get_interface_address6(int severity, sa_family_t family, tor_addr_t *addr)
/* Use the "discard" service port */
((struct sockaddr_in*)&target_addr)->sin_port = 9;
/* Don't worry: no packets are sent. We just need to use a real address
* on the actual internet. */
* on the actual Internet. */
if (family == AF_INET6) {
struct sockaddr_in6 *sin6 = (struct sockaddr_in6*)&target_addr;
sock = tor_open_socket(PF_INET6,SOCK_DGRAM,IPPROTO_UDP);
......@@ -1380,7 +1380,7 @@ tor_dup_ip(uint32_t addr)
/**
* Set *<b>addr</b> to the host-order IPv4 address (if any) of whatever
* interface connects to the internet. This address should only be used in
* interface connects to the Internet. This address should only be used in
* checking whether our address has changed. Return 0 on success, -1 on
* failure.
*/
......
......@@ -27,9 +27,9 @@
* via OpenSSL's EVP_EncryptUpdate function, or via the built-in AES
* implementation below. */
/** Defined iff we're using openssl's AES functions for AES. */
/** Defined iff we're using OpenSSL's AES functions for AES. */
#undef USE_OPENSSL_AES
/** Defined iff we're using openssl's EVP code for AES. */
/** Defined iff we're using OpenSSL's EVP code for AES. */
#undef USE_OPENSSL_EVP
/** Defined iff we're using Tor's internal AES implementation, defined
* below. */
......@@ -64,13 +64,13 @@
!defined(USE_OPENSSL_EVP))
/* OpenSSL 0.9.7 was the first to support AES. It was slower than our
* builtin implementation.
* built-in implementation.
* OpenSSL 0.9.8 added assembly implementations for i386 and ia64.
* Either the i386 stuff isn't used for x86-64, or it isn't faster.
* OpenSSL 0.9.9 (not yet out) has added assembly implementations for
* x86_64 (aka amd64), sparc9, and arm
*
* Note: the "f" at the end of openssl version numbers below means
* Note: the "f" at the end of OpenSSL version numbers below means
* "release". */
# if defined(CPU_IS_X86) || defined(CPU_IS_IA64)
# if OPENSSL_VERSION_NUMBER >= 0x0090800fL
......@@ -84,7 +84,7 @@
# endif
# endif
/* Otherwise, use the builtin implementation below. */
/* Otherwise, use the built-in implementation below. */
# ifndef USE_OPENSSL_AES
# define USE_BUILTIN_AES
# endif
......@@ -380,7 +380,7 @@ aes_set_iv(aes_cnt_cipher_t *cipher, const char *iv)
*
* @version 3.0 (December 2000)
*
* Optimised ANSI C code for the Rijndael cipher (now AES)
* Optimized ANSI C code for the Rijndael cipher (now AES)
*
* @author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be>
* @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be>
......
......@@ -403,7 +403,7 @@ const char TOR_TOLOWER_TABLE[256] = {
* function is called on __FILE__ to fix a MSVC nit where __FILE__
* contains the full path to the file. This is bad, because it
* confuses users to find the home directory of the person who
* compiled the binary in their warrning messages.
* compiled the binary in their warning messages.
*/
const char *
tor_fix_source_file(const char *fname)
......@@ -490,7 +490,7 @@ set_uint64(char *cp, uint64_t v)
}
/**
* Rename the file <b>from</b> to the file <b>to</b>. On unix, this is
* Rename the file <b>from</b> to the file <b>to</b>. On Unix, this is
* the same as rename(2). On windows, this removes <b>to</b> first if
* it already exists.
* Returns 0 on success. Returns -1 and sets errno on failure.
......@@ -632,7 +632,7 @@ tor_lockfile_unlock(tor_lockfile_t *lockfile)
tor_free(lockfile);
}
/* Some old versions of unix didn't define constants for these values,
/* Some old versions of Unix didn't define constants for these values,
* and instead expect you to say 0, 1, or 2. */
#ifndef SEEK_CUR
#define SEEK_CUR 1
......@@ -1568,7 +1568,7 @@ get_uname(void)
if (!uname_result_is_set) {
#ifdef HAVE_UNAME
if (uname(&u) != -1) {
/* (linux says 0 is success, solaris says 1 is success) */
/* (Linux says 0 is success, Solaris says 1 is success) */
tor_snprintf(uname_result, sizeof(uname_result), "%s %s",
u.sysname, u.machine);
} else
......@@ -1729,7 +1729,7 @@ tor_pthread_helper_fn(void *_data)
#endif
/** Minimalist interface to run a void function in the background. On
* unix calls fork, on win32 calls beginthread. Returns -1 on failure.
* Unix calls fork, on win32 calls beginthread. Returns -1 on failure.
* func should not return, but rather should call spawn_exit.
*
* NOTE: if <b>data</b> is used, it should not be allocated on the stack,
......@@ -1803,7 +1803,7 @@ tor_gettimeofday(struct timeval *timeval)
{
#ifdef MS_WINDOWS
/* Epoch bias copied from perl: number of units between windows epoch and
* unix epoch. */
* Unix epoch. */
#define EPOCH_BIAS U64_LITERAL(116444736000000000)
#define UNITS_PER_SEC U64_LITERAL(10000000)
#define USEC_PER_SEC U64_LITERAL(1000000)
......@@ -1936,7 +1936,7 @@ static pthread_mutexattr_t attr_reentrant;
/** True iff we've called tor_threads_init() */
static int threads_initialized = 0;
/** Initialize <b>mutex</b> so it can be locked. Every mutex must be set
* up eith tor_mutex_init() or tor_mutex_new(); not both. */
* up with tor_mutex_init() or tor_mutex_new(); not both. */
void
tor_mutex_init(tor_mutex_t *mutex)
{
......@@ -2259,7 +2259,7 @@ struct { int code; const char *msg; } windows_socket_errors[] = {
*/
{ -1, NULL },
};
/** There does not seem to be a strerror equivalent for winsock errors.
/** There does not seem to be a strerror equivalent for Winsock errors.
* Naturally, we have to roll our own.
*/
const char *
......@@ -2301,7 +2301,7 @@ network_init(void)
/** Return a newly allocated string describing the windows system error code
* <b>err</b>. Note that error codes are different from errno. Error codes
* come from GetLastError() when a winapi call fails. errno is set only when
* ansi functions fail. Whee. */
* ANSI functions fail. Whee. */
char *
format_win32_error(DWORD err)
{
......
/* Copyright (c) 2003-2004, Roger Dingledinex
/* Copyright (c) 2003-2004, Roger Dingledine
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
* Copyright (c) 2007-2009, The Tor Project, Inc. */
/* See LICENSE for licensing information */
......
......@@ -1227,7 +1227,7 @@ IMPLEMENT_ORDER_FUNC(find_nth_long, long)
digestset_t *
digestset_new(int max_elements)
{
/* The probability of false positivies is about P=(1 - exp(-kn/m))^k, where k
/* The probability of false positives is about P=(1 - exp(-kn/m))^k, where k
* is the number of hash functions per entry, m is the bits in the array,
* and n is the number of elements inserted. For us, k==4, n<=max_elements,
* and m==n_bits= approximately max_elements*32. This gives
......
......@@ -11,7 +11,7 @@
/** A resizeable list of pointers, with associated helpful functionality.
*
* The members of this struct are exposed only so that macros and inlines can
* use them; all access to smartlist internals should go throuch the functions
* use them; all access to smartlist internals should go through the functions
* and macros defined here.
**/
typedef struct smartlist_t {
......@@ -229,7 +229,7 @@ char *smartlist_join_strings2(smartlist_t *sl, const char *join,
STMT_END
/* Helper: Given two lists of items, possibly of different types, such that
* both lists are sorted on some common field (as determened by a comparison
* both lists are sorted on some common field (as determined by a comparison
* expression <b>cmpexpr</b>), and such that one list (<b>sl1</b>) has no
* duplicates on the common field, loop through the lists in lockstep, and
* execute <b>unmatched_var2</b> on items in var2 that do not appear in
......
......@@ -18,7 +18,7 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <wincrypt.h>
/* Windows defines this; so does openssl 0.9.8h and later. We don't actually
/* Windows defines this; so does OpenSSL 0.9.8h and later. We don't actually
* use either definition. */
#undef OCSP_RESPONSE
#endif
......@@ -56,7 +56,7 @@
#include "compat.h"
#if OPENSSL_VERSION_NUMBER < 0x00907000l
#error "We require openssl >= 0.9.7"
#error "We require OpenSSL >= 0.9.7"
#endif
#include <openssl/engine.h>
......@@ -67,13 +67,13 @@
#define PRIVATE_KEY_OK(k) ((k) && (k)->key && (k)->key->p)
#ifdef TOR_IS_MULTITHREADED
/** A number of prealloced mutexes for use by openssl. */
/** A number of preallocated mutexes for use by OpenSSL. */
static tor_mutex_t **_openssl_mutexes = NULL;
/** How many mutexes have we allocated for use by openssl? */
/** How many mutexes have we allocated for use by OpenSSL? */
static int _n_openssl_mutexes = 0;
#endif
/** A public key, or a public/private keypair. */
/** A public key, or a public/private key-pair. */
struct crypto_pk_env_t
{
int refs; /* reference counting so we don't have to copy keys */
......@@ -405,10 +405,10 @@ crypto_pk_generate_key(crypto_pk_env_t *env)
if (env->key)
RSA_free(env->key);
#if OPENSSL_VERSION_NUMBER < 0x00908000l
/* In openssl 0.9.7, RSA_generate_key is all we have. */
/* In OpenSSL 0.9.7, RSA_generate_key is all we have. */
env->key = RSA_generate_key(PK_BYTES*8,65537, NULL, NULL);
#else
/* In openssl 0.9.8, RSA_generate_key is deprecated. */
/* In OpenSSL 0.9.8, RSA_generate_key is deprecated. */
{
BIGNUM *e = BN_new();
RSA *r = NULL;
......@@ -452,7 +452,7 @@ crypto_pk_read_private_key_from_string(crypto_pk_env_t *env,
tor_assert(env);
tor_assert(s);
/* Create a read-only memory BIO, backed by the nul-terminated string 's' */
/* Create a read-only memory BIO, backed by the NUL-terminated string 's' */
b = BIO_new_mem_buf((char*)s, -1);
if (env->key)
......@@ -1054,7 +1054,7 @@ crypto_pk_asn1_decode(const char *str, size_t len)
RSA *rsa;
unsigned char *buf;
/* This ifdef suppresses a type warning. Take out the first case once
* everybody is using openssl 0.9.7 or later.
* everybody is using OpenSSL 0.9.7 or later.
*/
const unsigned char *cp;
cp = buf = tor_malloc(len);
......@@ -1393,7 +1393,7 @@ crypto_digest_add_bytes(crypto_digest_env_t *digest, const char *data,
tor_assert(digest);
tor_assert(data);
/* Using the SHA1_*() calls directly means we don't support doing
* sha1 in hardware. But so far the delay of getting the question
* SHA1 in hardware. But so far the delay of getting the question
* to the hardware, and hearing the answer, is likely higher than
* just doing it ourselves. Hashes are fast.
*/
......@@ -1554,7 +1554,7 @@ crypto_dh_generate_public(crypto_dh_env_t *dh)
if (tor_check_dh_key(dh->dh->pub_key)<0) {
log_warn(LD_CRYPTO, "Weird! Our own DH key was invalid. I guess once-in-"
"the-universe chances really do happen. Trying again.");
/* Free and clear the keys, so openssl will actually try again. */
/* Free and clear the keys, so OpenSSL will actually try again. */
BN_free(dh->dh->pub_key);
BN_free(dh->dh->priv_key);
dh->dh->pub_key = dh->dh->priv_key = NULL;
......@@ -1593,7 +1593,7 @@ crypto_dh_get_public(crypto_dh_env_t *dh, char *pubkey, size_t pubkey_len)
return 0;
}
/** Check for bad diffie-hellman public keys (g^x). Return 0 if the key is
/** Check for bad Diffie-Hellman public keys (g^x). Return 0 if the key is
* okay (in the subgroup [2,p-2]), or -1 if it's bad.
* See http://www.cl.cam.ac.uk/ftp/users/rja14/psandqs.ps.gz for some tips.
*/
......@@ -1742,11 +1742,11 @@ crypto_dh_free(crypto_dh_env_t *dh)
* work for us too. */
#define ADD_ENTROPY 32
/* Use RAND_poll if openssl is 0.9.6 release or later. (The "f" means
/* Use RAND_poll if OpenSSL is 0.9.6 release or later. (The "f" means
"release".) */
#define HAVE_RAND_POLL (OPENSSL_VERSION_NUMBER >= 0x0090600fl)
/* Versions of openssl prior to 0.9.7k and 0.9.8c had a bug where RAND_poll
/* Versions of OpenSSL prior to 0.9.7k and 0.9.8c had a bug where RAND_poll
* would allocate an fd_set on the stack, open a new file, and try to FD_SET
* that fd without checking whether it fit in the fd_set. Thus, if the
* system has not just been started up, it is unsafe to call */
......@@ -2281,7 +2281,7 @@ secret_to_key(char *key_out, size_t key_out_len, const char *secret,
}
#ifdef TOR_IS_MULTITHREADED
/** Helper: openssl uses this callback to manipulate mutexes. */
/** Helper: OpenSSL uses this callback to manipulate mutexes. */
static void
_openssl_locking_cb(int mode, int n, const char *file, int line)
{
......@@ -2298,12 +2298,12 @@ _openssl_locking_cb(int mode, int n, const char *file, int line)
tor_mutex_release(_openssl_mutexes[n]);
}
/** OpenSSL helper type: wraps a Tor mutex so that openssl can */
/** OpenSSL helper type: wraps a Tor mutex so that OpenSSL can */
struct CRYPTO_dynlock_value {
tor_mutex_t *lock;
};
/** Openssl callback function to allocate a lock: see CRYPTO_set_dynlock_*
/** OpenSSL callback function to allocate a lock: see CRYPTO_set_dynlock_*
* documentation in OpenSSL's docs for more info. */
static struct CRYPTO_dynlock_value *
_openssl_dynlock_create_cb(const char *file, int line)
......@@ -2316,7 +2316,7 @@ _openssl_dynlock_create_cb(const char *file, int line)
return v;
}
/** Openssl callback function to acquire or release a lock: see
/** OpenSSL callback function to acquire or release a lock: see
* CRYPTO_set_dynlock_* documentation in OpenSSL's docs for more info. */
static void
_openssl_dynlock_lock_cb(int mode, struct CRYPTO_dynlock_value *v,
......@@ -2330,7 +2330,7 @@ _openssl_dynlock_lock_cb(int mode, struct CRYPTO_dynlock_value *v,
tor_mutex_release(v->lock);
}
/** Openssl callback function to free a lock: see CRYPTO_set_dynlock_*
/** OpenSSL callback function to free a lock: see CRYPTO_set_dynlock_*
* documentation in OpenSSL's docs for more info. */
static void
_openssl_dynlock_destroy_cb(struct CRYPTO_dynlock_value *v,
......
......@@ -426,7 +426,7 @@ ht_string_hash(const char *s)
/*
* Copyright 2005, Nick Mathewson. Implementation logic is adapted from code
* by Cristopher Clark, retrofit to allow drop-in memory management, and to
* by Christopher Clark, retrofit to allow drop-in memory management, and to
* use the same interface as Niels Provos's HT_H. I'm not sure whether this
* is a derived work any more, but whether it is or not, the license below
* applies.
......
......@@ -53,7 +53,7 @@
/** Catch-all for miscellaneous events and fatal errors. */
#define LD_GENERAL (1u<<0)
/** The cryptography subsytem. */
/** The cryptography subsystem. */
#define LD_CRYPTO (1u<<1)
/** Networking. */
#define LD_NET (1u<<2)
......
......@@ -29,7 +29,7 @@
*/
#ifdef NDEBUG
/* Nobody should ever want to build with NDEBUG set. 99% of our asserts will
* be outside the critical path anyway, so it's silly to disable bugchecking
* be outside the critical path anyway, so it's silly to disable bug-checking
* throughout the entire program just because a few asserts are slowing you
* down. Profile, optimize the critical path, and keep debugging on.
*
......
......@@ -161,7 +161,7 @@ chunk_free(chunk_t *chunk)
}
/** Allocate a new chunk with a given allocation size, or get one from the
* freelist. Note that a chunk with allocation size A can actualy hold only
* freelist. Note that a chunk with allocation size A can actually hold only
* CHUNK_SIZE_WITH_ALLOC(A) bytes in its mem field. */
static INLINE chunk_t *
chunk_new_with_alloc_size(size_t alloc)
......@@ -787,7 +787,7 @@ flush_chunk(int s, buf_t *buf, chunk_t *chunk, size_t sz,
* <b>chunk</b> of buffer <b>buf</b> onto socket <b>s</b>. (Tries to write
* more if there is a forced pending write size.) On success, deduct the
* bytes written from *<b>buf_flushlen</b>. Return the number of bytes
* written on success, and a TOR_TLS error code on failue or blocking.
* written on success, and a TOR_TLS error code on failure or blocking.
*/
static INLINE int
flush_chunk_tls(tor_tls_t *tls, buf_t *buf, chunk_t *chunk,
......@@ -1108,7 +1108,7 @@ buf_find_pos_of_char(char ch, buf_pos_t *out)
}
/** Advance <b>pos</b> by a single character, if there are any more characters
* in the buffer. Returns 0 on sucess, -1 on failure. */
* in the buffer. Returns 0 on success, -1 on failure. */
static INLINE int
buf_pos_inc(buf_pos_t *pos)
{
......@@ -1169,13 +1169,13 @@ buf_find_string_offset(const buf_t *buf, const char *s, size_t n)
}
/** There is a (possibly incomplete) http statement on <b>buf</b>, of the
* form "\%s\\r\\n\\r\\n\%s", headers, body. (body may contain nuls.)
* form "\%s\\r\\n\\r\\n\%s", headers, body. (body may contain NULs.)
* If a) the headers include a Content-Length field and all bytes in
* the body are present, or b) there's no Content-Length field and
* all headers are present, then:
*
* - strdup headers into <b>*headers_out</b>, and nul-terminate it.
* - memdup body into <b>*body_out</b>, and nul-terminate it.
* - strdup headers into <b>*headers_out</b>, and NUL-terminate it.
* - memdup body into <b>*body_out</b>, and NUL-terminate it.
* - Then remove them from <b>buf</b>, and return 1.
*
* - If headers or body is NULL, discard that part of the buf.
......@@ -1259,14 +1259,14 @@ fetch_from_buf_http(buf_t *buf,
if (headers_out) {
*headers_out = tor_malloc(headerlen+1);
fetch_from_buf(*headers_out, headerlen, buf);
(*headers_out)[headerlen] = 0; /* nul terminate it */
(*headers_out)[headerlen] = 0; /* NUL terminate it */
}
if (body_out) {
tor_assert(body_used);
*body_used = bodylen;
*body_out = tor_malloc(bodylen+1);
fetch_from_buf(*body_out, bodylen, buf);
(*body_out)[bodylen] = 0; /* nul terminate it */
(*body_out)[bodylen] = 0; /* NUL terminate it */
}
check();
return 1;
......
......@@ -1938,7 +1938,7 @@ entry_is_time_to_retry(entry_guard_t *e, time_t now)
* right now. (Else return NULL.) In particular, it must be
* - Listed as either up or never yet contacted;
* - Present in the routerlist;
* - Listed as 'stable' or 'fast' by the current dirserver concensus,
* - Listed as 'stable' or 'fast' by the current dirserver consensus,
* if demanded by <b>need_uptime</b> or <b>need_capacity</b>;
* (This check is currently redundant with the Guard flag, but in
* the future that might change. Best to leave it in for now.)
......@@ -2025,7 +2025,7 @@ log_entry_guards(int severity)
/** Called when one or more guards that we would previously have used for some
* purpose are no longer in use because a higher-priority guard has become
* useable again. */
* usable again. */
static void
control_event_guard_deferred(void)
{
......
......@@ -298,13 +298,13 @@ circuit_expire_building(time_t now)
if (victim->purpose >= CIRCUIT_PURPOSE_C_INTRODUCING &&
victim->purpose <= CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED) {
if (!victim->timestamp_dirty)
log_fn(LOG_DEBUG,"Considering %sopen purp %d to %s (circid %d)."
log_fn(LOG_DEBUG,"Considering %sopen purpose %d to %s (circid %d)."
"(clean).",
victim->state == CIRCUIT_STATE_OPEN ? "" : "non",
victim->purpose, victim->build_state->chosen_exit_name,
victim->n_circ_id);
else
log_fn(LOG_DEBUG,"Considering %sopen purp %d to %s (circid %d). "
log_fn(LOG_DEBUG,"Considering %sopen purpose %d to %s (circid %d). "
"%d secs since dirty.",
victim->state == CIRCUIT_STATE_OPEN ? "" : "non",
victim->purpose, victim->build_state->chosen_exit_name,
......@@ -512,7 +512,7 @@ circuit_predict_and_launch_new(void)
flags |= CIRCLAUNCH_IS_INTERNAL;
log_info(LD_CIRC,
"Have %d clean circs (%d uptime-internal, %d internal), need"
" another hidserv circ.",
" another hidden service circ.",
num, num_uptime_internal, num_internal);
circuit_launch_by_router(CIRCUIT_PURPOSE_C_GENERAL, NULL, flags);
return;
......@@ -642,7 +642,7 @@ circuit_expire_old_circuits(time_t now)
if (circ->timestamp_dirty &&
circ->timestamp_dirty + get_options()->MaxCircuitDirtiness < now &&
!TO_ORIGIN_CIRCUIT(circ)->p_streams /* nothing attached */ ) {
log_debug(LD_CIRC, "Closing n_circ_id %d (dirty %d secs ago, purp %d)",
log_debug(LD_CIRC, "Closing n_circ_id %d (dirty %d secs ago, purpose %d)",
circ->n_circ_id, (int)(now - circ->timestamp_dirty),
circ->purpose);
circuit_mark_for_close(circ, END_CIRC_REASON_FINISHED);
......@@ -1035,7 +1035,7 @@ circuit_get_open_circ_or_launch(edge_connection_t *conn,
if (!want_onehop && !router_have_minimum_dir_info()) {