aboutsummaryrefslogtreecommitdiff
path: root/src/or/channeltls.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-03-21 10:20:16 -0400
committerNick Mathewson <nickm@torproject.org>2016-03-21 10:20:16 -0400
commitcb3f9bc2d48e8c3f4847643c03e082d394d33168 (patch)
tree738d21dd0265596baf2f8fd5482a5a9508212e15 /src/or/channeltls.c
parenta42938c07670162863decc952b4d73681d9302d6 (diff)
parent72ebf4160412f64fb6ae0cd97dd89d01d89c075a (diff)
downloadtor-cb3f9bc2d48e8c3f4847643c03e082d394d33168.tar.gz
tor-cb3f9bc2d48e8c3f4847643c03e082d394d33168.zip
Merge branch 'bug18570_027'
Diffstat (limited to 'src/or/channeltls.c')
-rw-r--r--src/or/channeltls.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/or/channeltls.c b/src/or/channeltls.c
index 30165bfcf2..c65af5d040 100644
--- a/src/or/channeltls.c
+++ b/src/or/channeltls.c
@@ -1011,6 +1011,11 @@ channel_tls_time_process_cell(cell_t *cell, channel_tls_t *chan, int *time,
* for cell types specific to the handshake for this transport protocol and
* handles them, and queues all other cells to the channel_t layer, which
* eventually will hand them off to command.c.
+ *
+ * The channel layer itself decides whether the cell should be queued or
+ * can be handed off immediately to the upper-layer code. It is responsible
+ * for copying in the case that it queues; we merely pass pointers through
+ * which we get from connection_or_process_cells_from_inbuf().
*/
void
@@ -1108,6 +1113,12 @@ channel_tls_handle_cell(cell_t *cell, or_connection_t *conn)
* related and live below the channel_t layer, so no variable-length
* cells ever get delivered in the current implementation, but I've left
* the mechanism in place for future use.
+ *
+ * If we were handing them off to the upper layer, the channel_t queueing
+ * code would be responsible for memory management, and we'd just be passing
+ * pointers through from connection_or_process_cells_from_inbuf(). That
+ * caller always frees them after this function returns, so this function
+ * should never free var_cell.
*/
void