diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-07-31 13:44:43 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-09-27 12:28:43 -0400 |
commit | 051491780090c610c06882ead4b2cf17bc6c93df (patch) | |
tree | ea8d881bc7c290e692e5ba6ed7af188032c6ba3f /src/or/buffers.c | |
parent | 5448501479b61c0ed365b4a96ce9442125c397b9 (diff) | |
download | tor-051491780090c610c06882ead4b2cf17bc6c93df.tar tor-051491780090c610c06882ead4b2cf17bc6c93df.tar.gz |
Add a new connection_fetch_from_buf_line() that can handle bufferevents
Diffstat (limited to 'src/or/buffers.c')
-rw-r--r-- | src/or/buffers.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index a1b5a3afc..5a34bd2bd 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -1755,12 +1755,12 @@ buf_find_offset_of_char(buf_t *buf, char ch) return -1; } -/** Try to read a single LF-terminated line from <b>buf</b>, and write it, - * NUL-terminated, into the *<b>data_len</b> byte buffer at <b>data_out</b>. - * Set *<b>data_len</b> to the number of bytes in the line, not counting the - * terminating NUL. Return 1 if we read a whole line, return 0 if we don't - * have a whole line yet, and return -1 if the line length exceeds - * *<b>data_len</b>. +/** Try to read a single LF-terminated line from <b>buf</b>, and write it + * (including the LF), NUL-terminated, into the *<b>data_len</b> byte buffer + * at <b>data_out</b>. Set *<b>data_len</b> to the number of bytes in the + * line, not counting the terminating NUL. Return 1 if we read a whole line, + * return 0 if we don't have a whole line yet, and return -1 if the line + * length exceeds *<b>data_len</b>. */ int fetch_from_buf_line(buf_t *buf, char *data_out, size_t *data_len) |