]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add clarifying comments to control_proto.c
authorTaylor Yu <catalyst@torproject.org>
Mon, 8 Apr 2019 18:39:04 +0000 (13:39 -0500)
committerTaylor Yu <catalyst@torproject.org>
Tue, 30 Apr 2019 18:18:46 +0000 (13:18 -0500)
Refer to control-spec.txt grammar productions in comments in
control_proto.c for clarity.

src/feature/control/control_proto.c

index daf5b1189e883a22fad01ab35259b6f3c09bb3c2..4756a02632ebc7d0977c742632389adce26430cb 100644 (file)
@@ -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)
 {