summaryrefslogtreecommitdiff
path: root/async.h
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2010-11-02 16:36:38 +0100
committerPieter Noordhuis <pcnoordhuis@gmail.com>2010-11-02 16:36:38 +0100
commitffa8666a647068f802eb784737ec533b6fc46115 (patch)
tree774a6ec4abc53f3b2f81e69c82e89949f83a39bc /async.h
parent5db8008d97c7ec85d7a4e03df3c28a2f7cf46894 (diff)
Change error reporting to have an explicit type
When there is an I/O error, errno should be used to find out what is wrong. In other cases, errno cannot be used. So, use an explicit type in Hiredis to define the different error scenarios that can occur.
Diffstat (limited to 'async.h')
-rw-r--r--async.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/async.h b/async.h
index 2e14b13..d0a99da 100644
--- a/async.h
+++ b/async.h
@@ -54,8 +54,9 @@ typedef struct redisAsyncContext {
/* Hold the regular context, so it can be realloc'ed. */
redisContext c;
- /* Hold a reference to the error object so it can be used directly. */
- char *error;
+ /* Setup error flags so they can be used directly. */
+ int err;
+ char *errstr;
/* Called when the library expects to start reading/writing.
* The supplied functions should be idempotent. */