提交 68423b14 编写于 作者: R Richard Levitte

Fix BIO_set_nbio_accept()

The code that implements this control would work when enabling nbio,
but the disabling code needed fixing.
Reviewed-by: NMatt Caswell <matt@openssl.org>
上级 b3bd3d5a
......@@ -474,16 +474,17 @@ static long acpt_ctrl(BIO *b, int cmd, long num, void *ptr)
data->param_serv = BUF_strdup(ptr);
b->init = 1;
} else if (num == 2) {
if (ptr != NULL)
data->bind_mode |= BIO_SOCK_NONBLOCK;
else
data->bind_mode &= ~BIO_SOCK_NONBLOCK;
data->bind_mode |= BIO_SOCK_NONBLOCK;
} else if (num == 3) {
BIO_free(data->bio_chain);
data->bio_chain = (BIO *)ptr;
} else if (num == 4) {
data->accept_family = *(int *)ptr;
}
} else {
if (num == 2) {
data->bind_mode &= ~BIO_SOCK_NONBLOCK;
}
}
break;
case BIO_C_SET_NBIO:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册