From: pk910 Date: Thu, 18 Oct 2012 22:57:56 +0000 (+0200) Subject: [IOMultiplexer] fixed SSL accept event handling X-Git-Url: http://git.pk910.de/?p=ChatPrototype.git;a=commitdiff_plain;h=7ee46ad238317932762e97d30170b013212dea12 [IOMultiplexer] fixed SSL accept event handling --- 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: