From 7ee46ad238317932762e97d30170b013212dea12 Mon Sep 17 00:00:00 2001 From: pk910 Date: Fri, 19 Oct 2012 00:57:56 +0200 Subject: [PATCH] [IOMultiplexer] fixed SSL accept event handling --- src/IOHandler.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/IOHandler.c b/src/IOHandler.c index 18e1b7f..52b27b3 100644 --- a/src/IOHandler.c +++ b/src/IOHandler.c @@ -648,14 +648,14 @@ void iohandler_events(struct IODescriptor *iofd, int readable, int writeable) { iohandler_ssl_connect(iofd); return; } - if(iofd->ssl && iofd->ssl_server_hs) - callback_event.type = IOEVENT_CONNECTED; - else { + if(iofd->ssl && iofd->ssl_server_hs) { callback_event.type = IOEVENT_SSLACCEPT; callback_event.iofd = iofd->data; callback_event.data.accept_iofd = iofd; iofd->data = NULL; } + else + callback_event.type = IOEVENT_CONNECTED; iofd->state = IO_CONNECTED; engine->update(iofd); } @@ -810,6 +810,8 @@ char *iohandler_ioeventtype_name(enum IOEventType type) { return "IOEVENT_CLOSED"; case IOEVENT_ACCEPT: return "IOEVENT_ACCEPT"; + case IOEVENT_SSLACCEPT: + return "IOEVENT_SSLACCEPT"; case IOEVENT_TIMEOUT: return "IOEVENT_TIMEOUT"; default: -- 2.20.1