Remove ASYNC_in_job()
The ASYNC_in_job() function is redundant. The same effect can be achieved by using ASYNC_get_current_job(). Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
c00793da99
commit
44a27ac282
@ -287,14 +287,6 @@ int ASYNC_pause_job(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ASYNC_in_job(void)
|
||||
{
|
||||
if(ASYNC_get_ctx())
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void async_empty_pool(STACK_OF(ASYNC_JOB) *pool)
|
||||
{
|
||||
ASYNC_JOB *job;
|
||||
|
@ -73,7 +73,6 @@ void ASYNC_free_pool(void);
|
||||
int ASYNC_start_job(ASYNC_JOB **job, int *ret, int (*func)(void *),
|
||||
void *args, size_t size);
|
||||
int ASYNC_pause_job(void);
|
||||
int ASYNC_in_job(void);
|
||||
|
||||
int ASYNC_get_wait_fd(ASYNC_JOB *job);
|
||||
ASYNC_JOB *ASYNC_get_current_job(void);
|
||||
|
@ -961,7 +961,7 @@ int SSL_accept(SSL *s)
|
||||
|
||||
args.s = s;
|
||||
|
||||
if((s->mode & SSL_MODE_ASYNC) && !ASYNC_in_job()) {
|
||||
if((s->mode & SSL_MODE_ASYNC) && ASYNC_get_current_job() == NULL) {
|
||||
switch(ASYNC_start_job(&s->job, &ret, ssl_accept_intern, &args,
|
||||
sizeof(struct ssl_async_args))) {
|
||||
case ASYNC_ERR:
|
||||
@ -1031,7 +1031,7 @@ int SSL_read(SSL *s, void *buf, int num)
|
||||
args.buf = buf;
|
||||
args.num = num;
|
||||
|
||||
if((s->mode & SSL_MODE_ASYNC) && !ASYNC_in_job()) {
|
||||
if((s->mode & SSL_MODE_ASYNC) && ASYNC_get_current_job() == NULL) {
|
||||
switch(ASYNC_start_job(&s->job, &ret, ssl_read_intern, &args,
|
||||
sizeof(struct ssl_async_args))) {
|
||||
case ASYNC_ERR:
|
||||
@ -1104,7 +1104,7 @@ int SSL_write(SSL *s, const void *buf, int num)
|
||||
args.buf = (void *) buf;
|
||||
args.num = num;
|
||||
|
||||
if((s->mode & SSL_MODE_ASYNC) && !ASYNC_in_job()) {
|
||||
if((s->mode & SSL_MODE_ASYNC) && ASYNC_get_current_job() == NULL) {
|
||||
switch(ASYNC_start_job(&s->job, &ret, ssl_write_intern, &args,
|
||||
sizeof(struct ssl_async_args))) {
|
||||
case ASYNC_ERR:
|
||||
|
Loading…
Reference in New Issue
Block a user