aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor Yu <catalyst@torproject.org>2019-04-08 13:39:04 -0500
committerTaylor Yu <catalyst@torproject.org>2019-04-30 13:18:46 -0500
commit482437754a7a30b651f096d4432a42aa61bd3b17 (patch)
tree006415176be97b7c7e7f9bd106926e060ed8c2a9
parent8e7316bae43e666a9fa3b99448561af90cbc21b8 (diff)
downloadtor-482437754a7a30b651f096d4432a42aa61bd3b17.tar.gz
tor-482437754a7a30b651f096d4432a42aa61bd3b17.zip
Add clarifying comments to control_proto.c
Refer to control-spec.txt grammar productions in comments in control_proto.c for clarity.
-rw-r--r--src/feature/control/control_proto.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/feature/control/control_proto.c b/src/feature/control/control_proto.c
index daf5b1189e..4756a02632 100644
--- a/src/feature/control/control_proto.c
+++ b/src/feature/control/control_proto.c
@@ -62,6 +62,8 @@ connection_printf_to_buf(control_connection_t *conn, const char *format, ...)
* that appears at the start of a line, and adding a period-CRLF line at
* the end. Replace all LF characters sequences with CRLF. Return the number
* of bytes in *<b>out</b>.
+ *
+ * This corresponds to CmdData in control-spec.txt.
*/
size_t
write_escaped_data(const char *data, size_t len, char **out)
@@ -118,7 +120,10 @@ write_escaped_data(const char *data, size_t len, char **out)
* the contents of <b>data</b> into *<b>out</b>, removing any period
* that appears at the start of a line, and replacing all CRLF sequences
* with LF. Return the number of
- * bytes in *<b>out</b>. */
+ * bytes in *<b>out</b>.
+ *
+ * This corresponds to CmdData in control-spec.txt.
+ */
size_t
read_escaped_data(const char *data, size_t len, char **out)
{