Skip to content

Commit

Permalink
libmemcached: sasl (fix #14 and #17)
Browse files Browse the repository at this point in the history
MEMCACHED_AUTH_CONTINUE was considered a failure condition which led to
IO reset
  • Loading branch information
m6w6 committed Jan 21, 2020
1 parent 4b540f4 commit 383ce14
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions libmemcached-1.0/return.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,20 @@ static inline bool memcached_success(memcached_return_t rc)

static inline bool memcached_failed(memcached_return_t rc)
{
return (rc != MEMCACHED_SUCCESS &&
return (rc != MEMCACHED_AUTH_CONTINUE &&
rc != MEMCACHED_BUFFERED &&
rc != MEMCACHED_DELETED &&
rc != MEMCACHED_END &&
rc != MEMCACHED_ITEM &&
rc != MEMCACHED_STAT &&
rc != MEMCACHED_STORED &&
rc != MEMCACHED_STAT &&
rc != MEMCACHED_DELETED &&
rc != MEMCACHED_BUFFERED &&
rc != MEMCACHED_SUCCESS &&
rc != MEMCACHED_VALUE);
}

static inline bool memcached_fatal(memcached_return_t rc)
{
return (
return (rc != MEMCACHED_AUTH_CONTINUE &&
rc != MEMCACHED_BUFFERED &&
rc != MEMCACHED_CLIENT_ERROR &&
rc != MEMCACHED_DATA_EXISTS &&
Expand Down

0 comments on commit 383ce14

Please # to comment.