From: Brian Aker Date: Sun, 16 Sep 2012 08:59:27 +0000 (-0400) Subject: Fix errno return to line up with error on socket. X-Git-Tag: 1.0.11~1^2~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=5274cc277f4a1216a7d566d2bb164c80e0d44d43;p=m6w6%2Flibmemcached Fix errno return to line up with error on socket. --- diff --git a/libmemcached/error.cc b/libmemcached/error.cc index 38c568c9..99316f1d 100644 --- a/libmemcached/error.cc +++ b/libmemcached/error.cc @@ -106,6 +106,11 @@ static void _set(memcached_st& memc, memcached_string_t *str, memcached_return_t rc= MEMCACHED_CONNECTION_FAILURE; } + if (rc == MEMCACHED_ERRNO and local_errno == ECONNRESET) + { + rc= MEMCACHED_CONNECTION_FAILURE; + } + if (local_errno == EINVAL) { rc= MEMCACHED_INVALID_ARGUMENTS; diff --git a/tests/libmemcached-1.0/include.am b/tests/libmemcached-1.0/include.am index 06cd8747..e5f00b9b 100644 --- a/tests/libmemcached-1.0/include.am +++ b/tests/libmemcached-1.0/include.am @@ -168,6 +168,9 @@ tests_libmemcached_1_0_testsocket_LDADD+= libhashkit/libhashkit.la check_PROGRAMS+= tests/libmemcached-1.0/testsocket noinst_PROGRAMS+= tests/libmemcached-1.0/testsocket +test-socket: tests/libmemcached-1.0/testsocket + @tests/libmemcached-1.0/testsocket + tests_libmemcached_1_0_sasl_SOURCES= tests_libmemcached_1_0_sasl_DEPENDENCIES= tests_libmemcached_1_0_sasl_LDADD=