aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-07-05 17:05:54 -0400
committerNick Mathewson <nickm@torproject.org>2018-07-05 17:15:50 -0400
commitf720a5a439b6fd3e9a283891c15f41f93532d81c (patch)
treef22d2493244a7db14ae125fc18009f19708f4ea5 /src
parent5f51c2de8bf27c1c5eba8c27d32273284d41a3d7 (diff)
downloadtor-f720a5a439b6fd3e9a283891c15f41f93532d81c.tar.gz
tor-f720a5a439b6fd3e9a283891c15f41f93532d81c.zip
Fix everything that previously referred to src/or
Diffstat (limited to 'src')
-rw-r--r--src/core/or/git_revision.c3
-rw-r--r--src/rust/external/external.rs2
-rw-r--r--src/rust/protover/ffi.rs4
-rw-r--r--src/rust/protover/protover.rs12
-rw-r--r--src/rust/tor_log/tor_log.rs2
-rwxr-xr-xsrc/test/test-network.sh4
-rw-r--r--src/test/test_bridges.c3
-rw-r--r--src/test/test_router.c3
8 files changed, 15 insertions, 18 deletions
diff --git a/src/core/or/git_revision.c b/src/core/or/git_revision.c
index f34f922c80..28ec1a7933 100644
--- a/src/core/or/git_revision.c
+++ b/src/core/or/git_revision.c
@@ -7,11 +7,10 @@
/** String describing which Tor Git repository version the source was
* built from. This string is generated by a bit of shell kludging in
- * src/or/include.am, and is usually right.
+ * src/core/include.am, and is usually right.
*/
const char tor_git_revision[] =
#ifndef _MSC_VER
#include "micro-revision.i"
#endif
"";
-
diff --git a/src/rust/external/external.rs b/src/rust/external/external.rs
index 66317f2128..059fdd0df7 100644
--- a/src/rust/external/external.rs
+++ b/src/rust/external/external.rs
@@ -11,7 +11,7 @@ extern "C" {
) -> c_int;
}
-/// Wrap calls to tor_version_as_new_as, defined in src/or/routerparse.c
+/// Wrap calls to tor_version_as_new_as, defined in routerparse.c
pub fn c_tor_version_as_new_as(platform: &str, cutoff: &str) -> bool {
// CHK: These functions should log a warning if an error occurs. This
// can be added when integration with tor's logger is added to rust
diff --git a/src/rust/protover/ffi.rs b/src/rust/protover/ffi.rs
index cd49e5f931..3055893d43 100644
--- a/src/rust/protover/ffi.rs
+++ b/src/rust/protover/ffi.rs
@@ -3,7 +3,7 @@
//! FFI functions, only to be called from C.
//!
-//! Equivalent C versions of this api are in `src/or/protover.c`
+//! Equivalent C versions of this api are in `protover.c`
use libc::{c_char, c_int, uint32_t};
use std::ffi::CStr;
@@ -18,7 +18,7 @@ use protover::*;
/// Translate C enums to Rust Proto enums, using the integer value of the C
/// enum to map to its associated Rust enum.
///
-/// C_RUST_COUPLED: src/or/protover.h `protocol_type_t`
+/// C_RUST_COUPLED: protover.h `protocol_type_t`
fn translate_to_rust(c_proto: uint32_t) -> Result<Protocol, ProtoverError> {
match c_proto {
0 => Ok(Protocol::Link),
diff --git a/src/rust/protover/protover.rs b/src/rust/protover/protover.rs
index f50419ed19..299e433722 100644
--- a/src/rust/protover/protover.rs
+++ b/src/rust/protover/protover.rs
@@ -19,13 +19,13 @@ use protoset::ProtoSet;
/// Authorities should use this to decide whether to guess proto lines.
///
/// C_RUST_COUPLED:
-/// src/or/protover.h `FIRST_TOR_VERSION_TO_ADVERTISE_PROTOCOLS`
+/// protover.h `FIRST_TOR_VERSION_TO_ADVERTISE_PROTOCOLS`
const FIRST_TOR_VERSION_TO_ADVERTISE_PROTOCOLS: &'static str = "0.2.9.3-alpha";
/// The maximum number of subprotocol version numbers we will attempt to expand
/// before concluding that someone is trying to DoS us
///
-/// C_RUST_COUPLED: src/or/protover.c `MAX_PROTOCOLS_TO_EXPAND`
+/// C_RUST_COUPLED: protover.c `MAX_PROTOCOLS_TO_EXPAND`
const MAX_PROTOCOLS_TO_EXPAND: usize = (1<<16);
/// The maximum size an `UnknownProtocol`'s name may be.
@@ -33,7 +33,7 @@ pub(crate) const MAX_PROTOCOL_NAME_LENGTH: usize = 100;
/// Known subprotocols in Tor. Indicates which subprotocol a relay supports.
///
-/// C_RUST_COUPLED: src/or/protover.h `protocol_type_t`
+/// C_RUST_COUPLED: protover.h `protocol_type_t`
#[derive(Clone, Hash, Eq, PartialEq, Debug)]
pub enum Protocol {
Cons,
@@ -57,7 +57,7 @@ impl fmt::Display for Protocol {
/// Translates a string representation of a protocol into a Proto type.
/// Error if the string is an unrecognized protocol name.
///
-/// C_RUST_COUPLED: src/or/protover.c `PROTOCOL_NAMES`
+/// C_RUST_COUPLED: protover.c `PROTOCOL_NAMES`
impl FromStr for Protocol {
type Err = ProtoverError;
@@ -130,7 +130,7 @@ impl From<Protocol> for UnknownProtocol {
/// Rust code can use the `&'static CStr` as a normal `&'a str` by
/// calling `protover::get_supported_protocols`.
///
-// C_RUST_COUPLED: src/or/protover.c `protover_get_supported_protocols`
+// C_RUST_COUPLED: protover.c `protover_get_supported_protocols`
pub(crate) fn get_supported_protocols_cstr() -> &'static CStr {
cstr!("Cons=1-2 \
Desc=1-2 \
@@ -601,7 +601,7 @@ impl ProtoverVote {
/// let vote = ProtoverVote::compute(protos, &2);
/// assert_eq!("Link=3", vote.to_string());
/// ```
- // C_RUST_COUPLED: /src/or/protover.c protover_compute_vote
+ // C_RUST_COUPLED: protover.c protover_compute_vote
pub fn compute(proto_entries: &[UnvalidatedProtoEntry], threshold: &usize) -> UnvalidatedProtoEntry {
let mut all_count: ProtoverVote = ProtoverVote::default();
let mut final_output: UnvalidatedProtoEntry = UnvalidatedProtoEntry::default();
diff --git a/src/rust/tor_log/tor_log.rs b/src/rust/tor_log/tor_log.rs
index 963c68afa8..49a1e7b158 100644
--- a/src/rust/tor_log/tor_log.rs
+++ b/src/rust/tor_log/tor_log.rs
@@ -129,7 +129,7 @@ pub mod log {
}
/// The main entry point into Tor's logger. When in non-test mode, this
- /// will link directly with `tor_log_string` in /src/or/log.c
+ /// will link directly with `tor_log_string` in torlog.c
extern "C" {
pub fn tor_log_string(
severity: c_int,
diff --git a/src/test/test-network.sh b/src/test/test-network.sh
index 6e0f286573..b7a9f1b3c0 100755
--- a/src/test/test-network.sh
+++ b/src/test/test-network.sh
@@ -52,12 +52,12 @@ done
# - if $PWD looks like a tor build directory, set it to $PWD, or
# - unset $TOR_DIR, and let chutney fall back to finding tor binaries in $PATH
if [ ! -d "$TOR_DIR" ]; then
- if [ -d "$BUILDDIR/src/or" -a -d "$BUILDDIR/src/tools" ]; then
+ if [ -d "$BUILDDIR/src/core/or" -a -d "$BUILDDIR/src/tools" ]; then
# Choose the build directory
# But only if it looks like one
$ECHO "$myname: \$TOR_DIR not set, trying \$BUILDDIR"
TOR_DIR="$BUILDDIR"
- elif [ -d "$PWD/src/or" -a -d "$PWD/src/tools" ]; then
+ elif [ -d "$PWD/src/core/or" -a -d "$PWD/src/tools" ]; then
# Guess the tor directory is the current directory
# But only if it looks like one
$ECHO "$myname: \$TOR_DIR not set, trying \$PWD"
diff --git a/src/test/test_bridges.c b/src/test/test_bridges.c
index bdab148901..07d6b88ed9 100644
--- a/src/test/test_bridges.c
+++ b/src/test/test_bridges.c
@@ -3,7 +3,7 @@
/**
* \file test_bridges.c
- * \brief Unittests for code in src/or/bridges.c
+ * \brief Unittests for code in bridges.c
**/
#define TOR_BRIDGES_PRIVATE
@@ -609,4 +609,3 @@ struct testcase_t bridges_tests[] = {
B_TEST(transport_is_needed, 0),
END_OF_TESTCASES
};
-
diff --git a/src/test/test_router.c b/src/test/test_router.c
index a398c7497b..c6a2452c8c 100644
--- a/src/test/test_router.c
+++ b/src/test/test_router.c
@@ -4,7 +4,7 @@
/**
* \file test_router.c
- * \brief Unittests for code in src/or/router.c
+ * \brief Unittests for code in router.c
**/
#include "core/or/or.h"
@@ -111,4 +111,3 @@ struct testcase_t router_tests[] = {
ROUTER_TEST(dump_router_to_string_no_bridge_distribution_method, TT_FORK),
END_OF_TESTCASES
};
-