]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Expose connection_init_accepted_conn.
authorNick Mathewson <nickm@torproject.org>
Wed, 18 Oct 2017 16:55:09 +0000 (12:55 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 18 Oct 2017 16:55:09 +0000 (12:55 -0400)
src/or/connection.c
src/or/connection.h

index 632a8336522f101afb4b0e223da5df9b2708f8ae..431ab3a3a0b0970fe7a8d2e3c6c71563a634c366 100644 (file)
@@ -118,8 +118,6 @@ static connection_t *connection_listener_new(
                                const port_cfg_t *portcfg);
 static void connection_init(time_t now, connection_t *conn, int type,
                             int socket_family);
-static int connection_init_accepted_conn(connection_t *conn,
-                          const listener_connection_t *listener);
 static int connection_handle_listener_read(connection_t *conn, int new_type);
 static int connection_bucket_should_increase(int bucket,
                                              or_connection_t *conn);
@@ -1662,11 +1660,15 @@ connection_handle_listener_read(connection_t *conn, int new_type)
 }
 
 /** Initialize states for newly accepted connection <b>conn</b>.
+ *
  * If conn is an OR, start the TLS handshake.
+ *
  * If conn is a transparent AP, get its original destination
  * and place it in circuit_wait.
+ *
+ * The <b>listener</b> parameter is only used for AP connections.
  */
-static int
+int
 connection_init_accepted_conn(connection_t *conn,
                               const listener_connection_t *listener)
 {
index 4a5bd6971bc12750139966b1c6639aa1f8ed8f2b..7f488676ed36f0ffb27492829990e5026cb4bc5f 100644 (file)
@@ -26,7 +26,8 @@ entry_connection_t *entry_connection_new(int type, int socket_family);
 control_connection_t *control_connection_new(int socket_family);
 listener_connection_t *listener_connection_new(int type, int socket_family);
 connection_t *connection_new(int type, int socket_family);
-
+int connection_init_accepted_conn(connection_t *conn,
+                                  const listener_connection_t *listener);
 void connection_link_connections(connection_t *conn_a, connection_t *conn_b);
 MOCK_DECL(void,connection_free,(connection_t *conn));
 void connection_free_all(void);