CVSROOT:        /cvs
Module name:    src
Changes by:     bl...@cvs.openbsd.org   2015/09/20 15:49:54

Modified files:
        usr.sbin/syslogd: evbuffer_tls.c 

Log message:
Misuse of libevent in TLS read and write might have caused strange
event loss in syslogd.  The ev_read and ev_write event structures
were used for both EV_READ and EV_WRITE events intermixedly.  The
correct way is to use each event for its read and write purpose and
instead switch the handler.  Then libevent is no longer confused.

When doing TLS read and a TLS_WANT_POLLOUT occures, call event_set()
for the write event to change the callback to read.  As there might
be an event scheduled on the event, call event_del() before
event_set().  After a successful TLS read, change back the write
event.  Add analog code for TLS write and handshake.

OK beck@

Reply via email to