commit - fd7e85b798c422f4b95de05b20ad56f59695938a
commit + 57aa64e1176b47830801cec8615affcc24cfb142
blob - 4ef8f661b2d4fac2640eed10f0fdf8f7316335db
blob + 46f1c9d0a584007707336f46b86bbea2b5632992
--- src/ngircd/conn-ssl.c
+++ src/ngircd/conn-ssl.c
switch (code) {
case GNUTLS_E_AGAIN:
case GNUTLS_E_INTERRUPTED:
- if (gnutls_record_get_direction(c->ssl_state.gnutls_session)) { /* need write */
- io_event_del(c->sock, IO_WANTREAD);
- Conn_OPTION_ADD(c, CONN_SSL_WANT_WRITE); /* fall through */
- break;
- } else { /* need read */
- io_event_del(c->sock, IO_WANTWRITE);
- Conn_OPTION_ADD(c, CONN_SSL_WANT_READ);
+ if (gnutls_record_get_direction(c->ssl_state.gnutls_session)) {
+ Conn_OPTION_ADD(c, CONN_SSL_WANT_WRITE);
+ io_event_del(c->sock, IO_WANTREAD);
+ } else {
+ Conn_OPTION_ADD(c, CONN_SSL_WANT_READ);
+ io_event_del(c->sock, IO_WANTWRITE);
+ }
break;
- }
default:
assert(code < 0);
if (gnutls_error_is_fatal(code)) {