Removed the function ASYNC_job_is_waiting() as it was redundant. The only
time user code has a handle on a job is when one is waiting, so all they
need to do is check whether the job is NULL. Also did some cleanups to
make sure the job really is NULL after it has been freed!
Reviewed-by: Rich Salz <rsalz@openssl.org>
*ret = ASYNC_get_ctx()->currjob->ret;
ASYNC_JOB_free(ASYNC_get_ctx()->currjob);
ASYNC_get_ctx()->currjob = NULL;
+ *job = NULL;
ASYNC_CTX_free();
return ASYNC_FINISH;
}
/* Should not happen */
ASYNC_JOB_free(ASYNC_get_ctx()->currjob);
ASYNC_get_ctx()->currjob = NULL;
+ *job = NULL;
ASYNC_CTX_free();
return ASYNC_ERR;
}
err:
ASYNC_JOB_free(ASYNC_get_ctx()->currjob);
ASYNC_get_ctx()->currjob = NULL;
+ *job = NULL;
ASYNC_CTX_free();
return ASYNC_ERR;
}
return 0;
}
-
-int ASYNC_job_is_waiting(ASYNC_JOB *job)
-{
- return job->status == ASYNC_JOB_PAUSED;
-}
void *args, size_t size);
int ASYNC_pause_job(void);
int ASYNC_in_job(void);
-int ASYNC_job_is_waiting(ASYNC_JOB *job);
# ifdef __cplusplus
}
int SSL_waiting_for_async(SSL *s)
{
- if(s->job) {
- return ASYNC_job_is_waiting(s->job);
- }
+ if(s->job)
+ return 1;
+
return 0;
}