summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-10-06 14:47:00 +0100
committerMatt Caswell <matt@openssl.org>2015-11-20 23:34:35 +0000
commit079a1a9014b89661f0a612a5a9724ad9c77f21a3 (patch)
tree2e04061d51e78ff7c6e53bdd2440497c9cbcc0c6 /include
parent9c8dc051d0a1293279bbf289b5f324824a02405b (diff)
Add ASYNC error codes
Add ASYNCerr support to give some meaningful error message in the event of a failure. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'include')
-rw-r--r--include/openssl/async.h28
-rw-r--r--include/openssl/err.h2
2 files changed, 27 insertions, 3 deletions
diff --git a/include/openssl/async.h b/include/openssl/async.h
index e123261e6b..9592cd6757 100644
--- a/include/openssl/async.h
+++ b/include/openssl/async.h
@@ -79,8 +79,30 @@ ASYNC_JOB *ASYNC_get_current_job(void);
void ASYNC_wake(ASYNC_JOB *job);
void ASYNC_clear_wake(ASYNC_JOB *job);
-# ifdef __cplusplus
-}
-# endif
+/* BEGIN ERROR CODES */
+/*
+ * The following lines are auto generated by the script mkerr.pl. Any changes
+ * made after this point may be overwritten when the script is next run.
+ */
+void ERR_load_ASYNC_strings(void);
+/* Error codes for the ASYNC functions. */
+
+/* Function codes. */
+# define ASYNC_F_ASYNC_CTX_NEW 100
+# define ASYNC_F_ASYNC_INIT_POOL 101
+# define ASYNC_F_ASYNC_JOB_NEW 102
+# define ASYNC_F_ASYNC_PAUSE_JOB 103
+# define ASYNC_F_ASYNC_START_FUNC 104
+# define ASYNC_F_ASYNC_START_JOB 105
+
+/* Reason codes. */
+# define ASYNC_R_CANNOT_CREATE_WAIT_PIPE 100
+# define ASYNC_R_FAILED_TO_SET_POOL 101
+# define ASYNC_R_FAILED_TO_SWAP_CONTEXT 102
+# define ASYNC_R_INVALID_POOL_SIZE 103
+
+#ifdef __cplusplus
+}
+#endif
#endif
diff --git a/include/openssl/err.h b/include/openssl/err.h
index 4c6d8d42ca..79bf6a3214 100644
--- a/include/openssl/err.h
+++ b/include/openssl/err.h
@@ -194,6 +194,7 @@ typedef struct err_state_st {
# define ERR_LIB_HMAC 48
# define ERR_LIB_JPAKE 49
# define ERR_LIB_CT 50
+# define ERR_LIB_ASYNC 51
# define ERR_LIB_USER 128
@@ -231,6 +232,7 @@ typedef struct err_state_st {
# define HMACerr(f,r) ERR_PUT_error(ERR_LIB_HMAC,(f),(r),__FILE__,__LINE__)
# define JPAKEerr(f,r) ERR_PUT_error(ERR_LIB_JPAKE,(f),(r),__FILE__,__LINE__)
# define CTerr(f,r) ERR_PUT_error(ERR_LIB_CT,(f),(r),__FILE__,__LINE__)
+# define ASYNCerr(f,r) ERR_PUT_error(ERR_LIB_ASYNC,(f),(r),__FILE__,__LINE__)
/*
* Borland C seems too stupid to be able to shift and do longs in the