Commit 66c6f223 authored by Roger Dingledine's avatar Roger Dingledine
Browse files

patch to fix running the program only as an op


svn:r27
parent a5be23d4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {
+2 −2
Original line number Diff line number Diff line
@@ -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);
+1 −0
Original line number Diff line number Diff line
@@ -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 */

+1 −0
Original line number Diff line number Diff line
@@ -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);