Add null async implementation

Create a "null" async implementation for platforms that lack support. This
just does nothing when called and therefore performs synchronously.

Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
Matt Caswell
2015-02-17 14:14:36 +00:00
parent 5010830495
commit 9ec1e03194
4 changed files with 86 additions and 11 deletions

View File

@@ -73,7 +73,8 @@ static ASYNC_CTX *ASYNC_CTX_new(void)
ASYNC_FIBRE_init_dispatcher(&nctx->dispatcher);
nctx->currjob = NULL;
ASYNC_set_ctx(nctx);
if(!ASYNC_set_ctx(nctx))
goto err;
return nctx;
err:
@@ -90,7 +91,8 @@ static int ASYNC_CTX_free(void)
OPENSSL_free(ASYNC_get_ctx());
}
ASYNC_set_ctx(NULL);
if(!ASYNC_set_ctx(NULL))
return 0;
return 1;
}