--- ../../tmp/jabber-1.4.2/jabberd/mio_ssl.c Fri Feb 8 02:39:27 2002 +++ mio_ssl.c Tue May 28 12:16:11 2002 @@ -219,6 +219,7 @@ SSL_CTX *ctx = NULL; int fd; int sret; + int flags; if(m->ip == NULL) { @@ -228,6 +229,12 @@ fd = accept(m->fd, serv_addr, addrlen); + /* set the socket to non-blocking as this is not + inherited */ + flags = fcntl(fd, F_GETFL, 0); + flags |= O_NONBLOCK; + fcntl(fd, F_SETFL, flags); + ctx = ghash_get(ssl__ctxs, m->ip); if(ctx == NULL) { @@ -235,7 +242,8 @@ return -1; } ssl = SSL_new(ctx); - log_debug(ZONE, "SSL accepting socket with new session %x", ssl); + log_debug(ZONE, "SSL accepting socket from %s with new session %x", + m->ip, ssl); SSL_set_fd(ssl, fd); SSL_set_accept_state(ssl); sret = SSL_accept(ssl);