提交 9920a58e 编写于 作者: M Matt Caswell

Fix the error code for SSL_get_async_wait_fd()

0 is a valid file descriptor so SSL_get_async_wait_fd should instead return
-1 on error.
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 bc8857bf
......@@ -2014,7 +2014,7 @@ static void wait_for_async(SSL *s)
fd_set asyncfds;
fd = SSL_get_async_wait_fd(s);
if (!fd)
if (fd < 0)
return;
width = fd + 1;
......
......@@ -934,7 +934,7 @@ int SSL_waiting_for_async(SSL *s)
int SSL_get_async_wait_fd(SSL *s)
{
if (!s->job)
return 0;
return -1;
return ASYNC_get_wait_fd(s->job);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册