X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fcommon.h;h=895c5a403494e5ce2ba206cd4663f245cc11cbe6;hb=f1563c45b37bba7d51228af44dc184a9d0308e81;hp=1d77ba1674891c01a94a42af89fbda3fc66b0a0d;hpb=55b5455291498ef63c1c34976552d58708a74732;p=awesomized%2Flibmemcached diff --git a/libmemcached/common.h b/libmemcached/common.h index 1d77ba16..895c5a40 100644 --- a/libmemcached/common.h +++ b/libmemcached/common.h @@ -168,11 +168,11 @@ static inline memcached_return_t memcached_validate_key_length(size_t key_length #endif /* - cork_switch() tries to enable TCP_CORK. IF TCP_CORK is not an option + test_cork() tries to enable TCP_CORK. IF TCP_CORK is not an option on the system it returns false but sets errno to 0. Otherwise on failure errno is set. */ -static inline memcached_ternary_t cork_switch(memcached_server_st *ptr, bool enable) +static inline memcached_ternary_t test_cork(memcached_server_st *ptr, int enable) { #ifdef CORK if (ptr->type != MEMCACHED_CONNECTION_TCP) @@ -184,11 +184,11 @@ static inline memcached_ternary_t cork_switch(memcached_server_st *ptr, bool ena { return MEM_TRUE; } - else - { - ptr->cached_errno= errno; - return MEM_FALSE; - } + + perror(strerror(errno)); + ptr->cached_errno= errno; + + return MEM_FALSE; #else (void)ptr; (void)enable;