diff --git a/src/or/connection.c b/src/or/connection.c index b44d72c68d..099936e5dc 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 5e9cae84d0..a2fb1a7969 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 543b1ea3f1..4fede2aa2f 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 e09b154f59..7e8d323b37 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);