[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] flagday] handle nicknames and connection init properly; go ...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] flagday] handle nicknames and connection init properly; go ...
- From: nickm@seul.org (Nick Mathewson)
- Date: Sat, 17 Apr 2004 14:15:03 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sat, 17 Apr 2004 14:15:26 -0400
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv5386/or
Modified Files:
Tag: tor-0_0_6incompat
connection_or.c main.c
Log Message:
[flagday] handle nicknames and connection init properly; go to cert chains. something still odd w/tls
Index: connection_or.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_or.c,v
retrieving revision 1.94.2.1
retrieving revision 1.94.2.2
diff -u -d -r1.94.2.1 -r1.94.2.2
--- connection_or.c 17 Apr 2004 01:37:27 -0000 1.94.2.1
+++ connection_or.c 17 Apr 2004 18:15:00 -0000 1.94.2.2
@@ -217,13 +217,14 @@
log_fn(LOG_INFO,"Router %s is already connected on fd %d. Dropping fd %d.", router->nickname, c->s, conn->s);
return -1;
}
-
- if (strcmp(conn->nickname, nickname)) {
+ if (conn->nickname && strcmp(conn->nickname, nickname)) {
log_fn(options.DirPort ? LOG_WARN : LOG_INFO,
- "Other side claims to be '%s', but we expected '%s'",
+ "Other side is '%s', but we tried to connect to '%s'",
nickname, conn->nickname);
return -1;
}
+ connection_or_init_conn_from_router(conn,router);
+
if (!options.ORPort) { /* If I'm an OP... */
conn->receiver_bucket = conn->bandwidth = DEFAULT_BANDWIDTH_OP;
}
Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.240
retrieving revision 1.240.2.1
diff -u -d -r1.240 -r1.240.2.1
--- main.c 13 Apr 2004 19:53:25 -0000 1.240
+++ main.c 17 Apr 2004 18:15:00 -0000 1.240.2.1
@@ -53,6 +53,7 @@
****************************************************************************/
int connection_add(connection_t *conn) {
+ assert(conn);
if(nfds >= options.MaxConn-1) {
log_fn(LOG_WARN,"failing because nfds is too high.");