[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[or-cvs] patch to fix running the program only as an op
Update of /home/or/cvsroot/src/or
In directory moria.seul.org:/home/arma/work/onion/cvs/src/or
Modified Files:
connection.c connection_or.c main.c or.h
Log Message:
patch to fix running the program only as an op
Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- connection.c 2 Jul 2002 09:36:58 -0000 1.3
+++ connection.c 3 Jul 2002 17:30:59 -0000 1.4
@@ -241,7 +241,7 @@
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) {
Index: connection_or.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_or.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- connection_or.c 2 Jul 2002 09:36:58 -0000 1.3
+++ connection_or.c 3 Jul 2002 17:30:59 -0000 1.4
@@ -53,7 +53,7 @@
}
/* 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 @@
}
/* 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);
Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- main.c 2 Jul 2002 09:36:58 -0000 1.3
+++ main.c 3 Jul 2002 17:30:59 -0000 1.4
@@ -8,6 +8,7 @@
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 */
Index: or.h
===================================================================
RCS file: /home/or/cvsroot/src/or/or.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- or.h 3 Jul 2002 16:31:22 -0000 1.4
+++ or.h 3 Jul 2002 17:30:59 -0000 1.5
@@ -475,6 +475,7 @@
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);