]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add comment explaining different channel close functions
authorAndrea Shepard <andrea@torproject.org>
Wed, 14 Nov 2012 02:50:37 +0000 (18:50 -0800)
committerAndrea Shepard <andrea@torproject.org>
Wed, 14 Nov 2012 02:50:37 +0000 (18:50 -0800)
src/or/channel.c

index 16dd9f903a900c8bb850de2cabcd981f6a04a55f..625d95781116de9fc033eb11bd7402ecc3ed35a6 100644 (file)
@@ -1057,6 +1057,19 @@ channel_set_cell_handlers(channel_t *chan,
        chan->var_cell_handler)) channel_process_cells(chan);
 }
 
+/*
+ * On closing channels
+ *
+ * There are three functions that close channels, for use in
+ * different circumstances:
+ *
+ *  - Use channel_mark_for_close() for most cases
+ *  - Use channel_close_from_lower_layer() if you are connection_or.c
+ *    and the other end closes the underlying connection.
+ *  - Use channel_close_for_error() if you are connection_or.c and
+ *    some sort of error has occurred.
+ */
+
 /**
  * Mark a channel for closure
  *