[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] break rend_client_desc_fetched out of connection_mark_for_c...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] break rend_client_desc_fetched out of connection_mark_for_c...
- From: arma@seul.org (Roger Dingledine)
- Date: Wed, 12 May 2004 16:36:46 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Wed, 12 May 2004 16:37:03 -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:/home2/arma/work/onion/cvs/src/or
Modified Files:
connection.c main.c or.h
Log Message:
break rend_client_desc_fetched out of connection_mark_for_close
Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection.c,v
retrieving revision 1.220
retrieving revision 1.221
diff -u -d -r1.220 -r1.221
--- connection.c 12 May 2004 19:49:48 -0000 1.220
+++ connection.c 12 May 2004 20:36:44 -0000 1.221
@@ -168,6 +168,15 @@
connection_free(carray[i]);
}
+void connection_about_to_close_connection(connection_t *conn)
+{
+ if(conn->type == CONN_TYPE_DIR)
+ if(conn->purpose == DIR_PURPOSE_FETCH_RENDDESC)
+ rend_client_desc_fetched(conn->rend_query, 0);
+
+
+}
+
/** Close the underlying socket for <b>conn</b>, so we don't try to
* flush it. Must be used in conjunction with (right before)
* connection_mark_for_close().
@@ -218,11 +227,8 @@
case CONN_TYPE_AP_LISTENER:
case CONN_TYPE_DIR_LISTENER:
case CONN_TYPE_CPUWORKER:
- /* No special processing needed. */
- break;
case CONN_TYPE_DIR:
- if(conn->purpose == DIR_PURPOSE_FETCH_RENDDESC)
- rend_client_desc_fetched(conn->rend_query, 0);
+ /* No special processing needed immediately. */
break;
case CONN_TYPE_OR:
/* Remember why we're closing this connection. */
Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.264
retrieving revision 1.265
diff -u -d -r1.264 -r1.265
--- main.c 12 May 2004 18:41:32 -0000 1.264
+++ main.c 12 May 2004 20:36:44 -0000 1.265
@@ -313,6 +313,7 @@
* flush and send destroys for all circuits on this conn
*/
circuit_about_to_close_connection(conn);
+ connection_about_to_close_connection(conn);
connection_remove(conn);
if(conn->type == CONN_TYPE_EXIT) {
assert_connection_edge_not_dns_pending(conn);
Index: or.h
===================================================================
RCS file: /home/or/cvsroot/src/or/or.h,v
retrieving revision 1.342
retrieving revision 1.343
diff -u -d -r1.342 -r1.343
--- or.h 12 May 2004 19:49:48 -0000 1.342
+++ or.h 12 May 2004 20:36:44 -0000 1.343
@@ -954,6 +954,7 @@
connection_t *connection_new(int type);
void connection_free(connection_t *conn);
void connection_free_all(void);
+void connection_about_to_close_connection(connection_t *conn);
void connection_close_immediate(connection_t *conn);
int _connection_mark_for_close(connection_t *conn, char reason);