X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Freturn.h;h=fa36243f769db098cb474392384c6ba6c3d200d1;hb=a60c98bb02391f995a03c3db5898e146ff2f6f3b;hp=d45d2e853e570d0ca24a8c6559fec5fba92f558b;hpb=67273f66706007938d9b689b0106802f1d0dd65a;p=awesomized%2Flibmemcached diff --git a/libmemcached/return.h b/libmemcached/return.h index d45d2e85..fa36243f 100644 --- a/libmemcached/return.h +++ b/libmemcached/return.h @@ -84,6 +84,7 @@ enum memcached_return_t { MEMCACHED_PARSE_USER_ERROR, MEMCACHED_DEPRECATED, MEMCACHED_IN_PROGRESS, + MEMCACHED_SERVER_TEMPORARILY_DISABLED, MEMCACHED_MAXIMUM_RETURN /* Always add new error code before */ }; @@ -114,4 +115,15 @@ static inline bool memcached_failed(memcached_return_t rc) rc != MEMCACHED_VALUE); } +static inline bool memcached_fatal(memcached_return_t rc) +{ + return (rc != MEMCACHED_SUCCESS && + rc != MEMCACHED_END && + rc != MEMCACHED_STORED && + rc != MEMCACHED_STAT && + rc != MEMCACHED_DELETED && + rc != MEMCACHED_BUFFERED && + rc != MEMCACHED_VALUE); +} + #define memcached_continue(__memcached_return_t) ((__memcached_return_t) == MEMCACHED_IN_PROGRESS)