From: Andrea Shepard Date: Wed, 14 Nov 2012 02:50:37 +0000 (-0800) Subject: Add comment explaining different channel close functions X-Git-Tag: tor-0.2.4.7-alpha~36^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3db3daa663e9fe41f87993f4580cf3a8e6bab27c;p=thirdparty%2Ftor.git Add comment explaining different channel close functions --- diff --git a/src/or/channel.c b/src/or/channel.c index 16dd9f903a..625d957811 100644 --- a/src/or/channel.c +++ b/src/or/channel.c @@ -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 *