[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Fix Tor for no-threading compilation: move connection_unreg...
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] Fix Tor for no-threading compilation: move connection_unreg...
- From: nickm@xxxxxxxx (Nick Mathewson)
- Date: Tue, 5 Apr 2005 20:46:59 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Tue, 05 Apr 2005 20:47:18 -0400
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv15726/src/or
Modified Files:
connection.c
Log Message:
Fix Tor for no-threading compilation: move connection_unregister from _connection_free to connection_free.
Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/connection.c,v
retrieving revision 1.352
retrieving revision 1.353
diff -u -d -r1.352 -r1.353
--- connection.c 3 Apr 2005 05:22:33 -0000 1.352
+++ connection.c 6 Apr 2005 00:46:57 -0000 1.353
@@ -171,8 +171,6 @@
tor_free(conn->chosen_exit_name);
if (connection_speaks_cells(conn)) {
- if (conn->state == OR_CONN_STATE_OPEN)
- directory_set_dirty();
if (conn->tls) {
tor_tls_free(conn->tls);
conn->tls = NULL;
@@ -183,8 +181,8 @@
crypto_free_pk_env(conn->identity_pkey);
tor_free(conn->nickname);
tor_free(conn->socks_request);
-
- connection_unregister(conn);
+ tor_free(conn->read_event); /* Probably already freed by connection_free. */
+ tor_free(conn->write_event); /* Probably already freed by connection_free. */
if (conn->s >= 0) {
log_fn(LOG_INFO,"closing fd %d.",conn->s);
@@ -201,6 +199,11 @@
tor_assert(conn);
tor_assert(!connection_is_on_closeable_list(conn));
tor_assert(!connection_in_array(conn));
+ if (connection_speaks_cells(conn)) {
+ if (conn->state == OR_CONN_STATE_OPEN)
+ directory_set_dirty();
+ }
+ connection_unregister(conn);
_connection_free(conn);
}