summaryrefslogtreecommitdiffstats
path: root/crypto/async/async.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-02-17 14:14:36 +0000
committerMatt Caswell <matt@openssl.org>2015-11-20 23:32:18 +0000
commit9ec1e03194568630a2e58232d56e9d37dd13ed7d (patch)
tree0e6c1fa2f6895d99d0cdc36733c2b813dd41bedd /crypto/async/async.c
parent501083049590455b1862edd7573fd51bb37bb037 (diff)
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>
Diffstat (limited to 'crypto/async/async.c')
-rw-r--r--crypto/async/async.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/async/async.c b/crypto/async/async.c
index 9b044d3d1e..cef5f4f959 100644
--- a/crypto/async/async.c
+++ b/crypto/async/async.c
@@ -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;
}