aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2002-07-03 17:30:59 +0000
committerRoger Dingledine <arma@torproject.org>2002-07-03 17:30:59 +0000
commit66c6f2231ec1ac5b3249aa144400d951c0dca47f (patch)
tree34e144a5ad5626e6e4922d8032d984ba1898ee99 /src/or
parenta5be23d4754e4e78f5391cf408d31cf54f32e8f7 (diff)
downloadtor-66c6f2231ec1ac5b3249aa144400d951c0dca47f.tar
tor-66c6f2231ec1ac5b3249aa144400d951c0dca47f.tar.gz
patch to fix running the program only as an op
svn:r27
Diffstat (limited to 'src/or')
-rw-r--r--src/or/connection.c2
-rw-r--r--src/or/connection_or.c4
-rw-r--r--src/or/main.c1
-rw-r--r--src/or/or.h1
4 files changed, 5 insertions, 3 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index b44d72c68..099936e5d 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -241,7 +241,7 @@ connection_t *connection_connect_to_router_as_op(routerinfo_t *router, RSA *prke
if(learn_local(&local) < 0)
return NULL;
local.sin_port = htons(local_or_port);
- return connection_or_connect_as_or(router, prkey, &local);
+ return connection_or_connect_as_op(router, prkey, &local);
}
int connection_read_to_buf(connection_t *conn) {
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 5e9cae84d..a2fb1a796 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -53,7 +53,7 @@ int connection_or_finished_flushing(connection_t *conn) {
}
/* the connect has finished. */
- log(LOG_DEBUG,"connection_or_finished_flushing() : Connection to router %s:%u established.",
+ log(LOG_DEBUG,"connection_or_finished_flushing() : OP connection to router %s:%u established.",
conn->address,ntohs(conn->port));
return or_handshake_op_send_keys(conn);
@@ -71,7 +71,7 @@ int connection_or_finished_flushing(connection_t *conn) {
}
/* the connect has finished. */
- log(LOG_DEBUG,"connection_or_finished_flushing() : Connection to router %s:%u established.",
+ log(LOG_DEBUG,"connection_or_finished_flushing() : OR connection to router %s:%u established.",
conn->address,ntohs(conn->port));
return or_handshake_client_send_auth(conn);
diff --git a/src/or/main.c b/src/or/main.c
index 543b1ea3f..4fede2aa2 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -8,6 +8,7 @@ static char *args = "hf:e:n:l:";
int loglevel = LOG_DEBUG;
+//int global_role = ROLE_AP_LISTEN;
int global_role = ROLE_OR_LISTEN | ROLE_OR_CONNECT_ALL | ROLE_OP_LISTEN | ROLE_AP_LISTEN;
/* FIXME defaulting to all roles for now. should make it a config option though */
diff --git a/src/or/or.h b/src/or/or.h
index e09b154f5..7e8d323b3 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -475,6 +475,7 @@ int or_handshake_server_process_nonce(connection_t *conn);
connection_t *connect_to_router_as_or(routerinfo_t *router, RSA *prkey, struct sockaddr_in *local);
connection_t *connection_or_connect_as_or(routerinfo_t *router, RSA *prkey, struct sockaddr_in *local);
+connection_t *connection_or_connect_as_op(routerinfo_t *router, RSA *prkey, struct sockaddr_in *local);
int connection_or_create_listener(RSA *prkey, struct sockaddr_in *local);
int connection_or_handle_listener_read(connection_t *conn);