Clarify ASYNC_WAIT_CTX_clear_fd() docs
authorMatt Caswell <matt@openssl.org>
Mon, 29 Feb 2016 12:15:27 +0000 (12:15 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 29 Feb 2016 12:58:44 +0000 (12:58 +0000)
Clarify that the "cleanup" routing does not get called if you invoke
ASYNC_WAIT_CTX_clear_fd() directly.

Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/async/async_wait.c
doc/crypto/ASYNC_WAIT_CTX_new.pod

index 9d90e524c37a08df70f129c593fd80c9d49ed207..94f1a6b4e03def76d8896aa240465243f24e9f76 100644 (file)
@@ -191,7 +191,8 @@ int ASYNC_WAIT_CTX_clear_fd(ASYNC_WAIT_CTX *ctx, const void *key)
         if (curr->key == key) {
             /*
              * Mark it as deleted. We don't call cleanup if explicitly asked
-             * to clear an fd. We assume the caller is going to do that
+             * to clear an fd. We assume the caller is going to do that (if
+             * appropriate).
              */
             curr->del = 1;
             ctx->numdel++;
index b70f730f5e1aa93ad8d99bc85be0a2ccf4d945a1..c4e4d0e38d51dd7c5a290381ce479c51f20b1aa5 100644 (file)
@@ -90,7 +90,8 @@ in a subsequent call to ASYNC_WAIT_CTX_get_fd(). The
 ASYNC_WAIT_CTX_set_wait_fd() function also expects a pointer to a "cleanup"
 routine. This can be NULL but if provided will automatically get called when the
 ASYNC_WAIT_CTX is freed, and gives the engine the opportunity to close the fd or
-any other resources.
+any other resources. Note: The "cleanup" routine does not get called if the fd
+is cleared directly via a call to ASYNC_WAIT_CTX_clear_fd().
 
 An example of typical usage might be an async capable engine. User code would
 initiate cryptographic operations. The engine would initiate those operations