[or-cvs] [tor/master 6/6] Remove XXXs about improving buf_t API: bufferevents are the future

nickm at torproject.org nickm at torproject.org
Fri Oct 15 16:07:33 UTC 2010


Author: Nick Mathewson <nickm at torproject.org>
Date: Fri, 15 Oct 2010 11:38:33 -0400
Subject: Remove XXXs about improving  buf_t API: bufferevents are the future
Commit: 9516c1efdb723bba64dc9dfcc71aa64a48079fb3

---
 src/or/buffers.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/src/or/buffers.c b/src/or/buffers.c
index 11c656f..08ed891 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -640,14 +640,10 @@ read_to_chunk_tls(buf_t *buf, chunk_t *chunk, tor_tls_t *tls,
  * (because of EOF), set *<b>reached_eof</b> to 1 and return 0. Return -1 on
  * error; else return the number of bytes read.
  */
-/* XXXX021 indicate "read blocked" somehow? */
 int
 read_to_buf(int s, size_t at_most, buf_t *buf, int *reached_eof,
             int *socket_error)
 {
-  /* XXXX021 It's stupid to overload the return values for these functions:
-   * "error status" and "number of bytes read" are not mutually exclusive.
-   */
   int r = 0;
   size_t total_read = 0;
 
@@ -815,9 +811,6 @@ flush_chunk_tls(tor_tls_t *tls, buf_t *buf, chunk_t *chunk,
 int
 flush_buf(int s, buf_t *buf, size_t sz, size_t *buf_flushlen)
 {
-  /* XXXX021 It's stupid to overload the return values for these functions:
-   * "error status" and "number of bytes flushed" are not mutually exclusive.
-   */
   int r;
   size_t flushed = 0;
   tor_assert(buf_flushlen);
@@ -1119,8 +1112,7 @@ fetch_var_cell_from_evbuffer(struct evbuffer *buf, var_cell_t **out,
 int
 move_buf_to_buf(buf_t *buf_out, buf_t *buf_in, size_t *buf_flushlen)
 {
-  /* XXXX we can do way better here, but this doesn't turn up in any
-   * profiles. */
+  /* We can do way better here, but this doesn't turn up in any profiles. */
   char b[4096];
   size_t cp, len;
   len = *buf_flushlen;
-- 
1.7.1



More information about the tor-commits mailing list