]> git.ipfire.org Git - thirdparty/tor.git/commit
Fix a bufferevent-related bug that killed tunneled dirserv conns
authorNick Mathewson <nickm@torproject.org>
Fri, 26 Aug 2011 20:10:17 +0000 (16:10 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 26 Aug 2011 20:10:17 +0000 (16:10 -0400)
commit81fe1934af666f81b4e6dededba514c7c0b39faa
tree090f2d333acf1346c57ee3c676f0f936b1457bce
parentb161674d5dc312f95a495bed3c25d892fc9f0550
Fix a bufferevent-related bug that killed tunneled dirserv conns

Because tunneled connections are implemented with buffervent_pair,
writing to them can cause an immediate flush.  This means that
added to them and then checking to see whether their outbuf is
empty is _not_ an adequate way to see whether you added anything.
This caused a problem in directory server connections, since they
would try spooling a little more data out, and then close the
connection if there was no queued data to send.

This fix should improve matters; it only closes the connection if
there is no more data to spool, and all of the spooling callbacks
are supposed to put the dirconn into dir_spool_none on completion.

This is bug 3814; Sebastian found it; bugfix on 0.2.3.1-alpha.
changes/bug3814 [new file with mode: 0644]
src/or/directory.c