Go to file
Hector Martin 0426cb523a Fix: Rework SSL poll event handling to avoid infinite loops
The downstream connection callback must only be invoked when the event
that SSL requests for the connection to make progress has actually
occured. Otherwise, the downstream callback might do nothing but
re-queue an unrelated event (e.g. in user_net_io_want_write), and the
event loop comes around instantly while making no progress. Track the
SSL-requested events separately and deliver the required downstream
event when they fire.

Sample strace:

epoll_wait(0, {{EPOLLIN, {u32=96, u64=96}}}, 91, 10000) = 1
: net_ssl_callback in state tls_st_need_write calls cb NET_EVENT_WRITE
: User writes data, OpenSSL tries to write data
write(96, <snip>..., 170) = -1 EAGAIN (Resource temporarily unavailable)
: handle_openssl_error requests NET_EVENT_WRITE
epoll_ctl(0, EPOLL_CTL_MOD, 96, {EPOLLOUT, {u32=96, u64=96}}) = 0
: User callback then requests NET_EVENT_READ|NET_EVENT_WRITE
epoll_ctl(0, EPOLL_CTL_MOD, 96, {EPOLLIN|EPOLLOUT, {u32=96, u64=96}}) =
: Data available for *reading*
epoll_wait(0, {{EPOLLIN, {u32=96, u64=96}}}, 91, 10000) = 1
: net_ssl_callback in state tls_st_need_write calls cb NET_EVENT_WRITE
: again...
2014-07-29 12:09:07 +02:00
admin Cleanup after creating debian packages. 2009-03-24 23:16:09 +01:00
autotest Fix crashing autotest due to wrong initialization of the usermanager. 2014-05-14 11:00:14 +02:00
cmake/Modules Fix cmake script for searching sqlite3 properly. 2014-05-08 22:52:10 +04:00
debian Updated init script in debian package. 2012-05-08 23:40:16 +03:00
doc rename !cleartopic to !resettopic 2012-11-08 15:14:58 +01:00
src Fix: Rework SSL poll event handling to avoid infinite loops 2014-07-29 12:09:07 +02:00
thirdparty Added sqlite as a git submodule. 2011-12-28 18:08:11 +01:00
tools Added an ADC hub redirector written in python. 2013-02-10 22:56:36 +01:00
.gitignore fixup! Updated .gitignore 2012-10-02 21:54:56 +02:00
.gitmodules Added sqlite as a git submodule. 2011-12-28 18:08:11 +01:00
.travis.yml Add support of Travis CI. 2014-05-11 16:07:38 +04:00
AUTHORS Added mod_chat_history_sqlite and mod_chat_is_privileged. 2013-03-23 22:47:32 +01:00
BUGS Document new bugs strategies 2009-03-16 17:35:08 +01:00
CMakeLists.txt Fix build with clang. 2014-05-11 15:22:14 +04:00
COPYING First git commit. 2009-02-19 17:14:09 +01:00
COPYING.OpenSSL Fix bug #183 - Added proper OpenSSL license exception for the GPL. 2012-04-22 22:23:11 +02:00
ChangeLog Updated changelog for 0.4.1 release. 2012-11-07 20:24:06 +01:00
README update client software link 2012-04-19 02:43:59 +02:00
TODO Add TODO file. Some modify example uhub.conf 2010-01-14 09:46:55 +03:00

README

Welcome and thanks for downloading uHub, a high performance ADC p2p hub.

For the official documentation, bugs and other information, please visit:
http://www.uhub.org/

For a list of compatible ADC clients, see:
http://en.wikipedia.org/wiki/Advanced_Direct_Connect#Client_software