[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Replace all connection_removes outsice of main.c with conne...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] Replace all connection_removes outsice of main.c with conne...
- From: nickm@seul.org (Nick Mathewson)
- Date: Sat, 20 Mar 2004 22:18:47 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sat, 20 Mar 2004 22:19:13 -0500
- 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-serv28730/src/or
Modified Files:
connection_or.c directory.c
Log Message:
Replace all connection_removes outsice of main.c with connection_mark_for_close
Index: connection_or.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_or.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- connection_or.c 21 Mar 2004 03:03:10 -0000 1.89
+++ connection_or.c 21 Mar 2004 03:18:45 -0000 1.90
@@ -112,8 +112,6 @@
/* set up conn so it's got all the data we need to remember */
connection_or_init_conn_from_router(conn, router);
- /* XXXX Should all this stuff do mark-for-close instead? */
-
if(connection_add(conn) < 0) { /* no space, forget it */
connection_free(conn);
return NULL;
@@ -121,8 +119,7 @@
switch(connection_connect(conn, router->address, router->addr, router->or_port)) {
case -1:
- connection_remove(conn);
- connection_free(conn);
+ connection_mark_for_close(conn, 0);
return NULL;
case 0:
connection_set_poll_socket(conn);
@@ -140,8 +137,7 @@
return conn;
/* failure */
- connection_remove(conn);
- connection_free(conn);
+ connection_mark_for_close(conn, 0);
return NULL;
}
Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/src/or/directory.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- directory.c 19 Mar 2004 20:50:12 -0000 1.65
+++ directory.c 21 Mar 2004 03:18:45 -0000 1.66
@@ -48,8 +48,7 @@
switch(connection_connect(conn, router->address, router->addr, router->dir_port)) {
case -1:
router_mark_as_down(conn->nickname); /* don't try him again */
- connection_remove(conn);
- connection_free(conn);
+ connection_mark_for_close(conn, 0);
return;
case 0:
connection_set_poll_socket(conn);
@@ -63,8 +62,7 @@
connection_set_poll_socket(conn);
if(directory_send_command(conn, command) < 0) {
- connection_remove(conn);
- connection_free(conn);
+ connection_mark_for_close(conn, 0);
}
}