diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-08-18 16:15:03 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-08-18 16:15:03 -0400 |
commit | df96aed14f67c9ffc2c4908add7079a0424d7cbb (patch) | |
tree | 5823516273a9b2f69b915e6e3664f04e2596819d | |
parent | 263d68aa82e77026e2a34c07152435b0c31feb0e (diff) | |
download | tor-df96aed14f67c9ffc2c4908add7079a0424d7cbb.tar.gz tor-df96aed14f67c9ffc2c4908add7079a0424d7cbb.zip |
Remove warning about a loop parsing evbuffer socks
This behavior is normal when we want more data than the evbuffer
actually has for us. We'll ask for (say) 7 bytes, get only 5
(because that's all there is), try to parse the 5 bytes, and get
told "no, I want 7". One option would be to bail out early whenever
want_length is > buflen, but sometimes we use an over-large
want_length. So instead, let's just remove the warning here: it's
not a bug after all.
-rw-r--r-- | src/or/buffers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index ffc15141ab..85d58e8986 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -1657,9 +1657,9 @@ fetch_from_evbuffer_socks(struct evbuffer *buf, socks_request_t *req, if (res == 0 && n_drain == 0 && want_length <= last_wanted) { /* If we drained nothing, and we didn't ask for more than last time, - * we're stuck in a loop. That's bad. It shouldn't be possible, but - * let's make sure. */ - log_warn(LD_BUG, "We seem to be caught in a parse loop; breaking out"); + * then we probably wanted more data than the buffer actually had, + * and we're finding out that we're not satisified with it. It's + * time to break until we have more data. */ break; } |