From: Brian Aker Date: Tue, 29 Jan 2013 00:21:30 +0000 (-0500) Subject: Fix binary touch. X-Git-Tag: 1.0.16~2^2~2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=53aa3021fa0dea4c4bebdd05b7f7c5a212184e69;hp=743e893ecbbaacd66d2832e9c3ae16404422a173;p=awesomized%2Flibmemcached Fix binary touch. --- diff --git a/libmemcached/response.cc b/libmemcached/response.cc index cf7ed41e..96772ff3 100644 --- a/libmemcached/response.cc +++ b/libmemcached/response.cc @@ -658,7 +658,11 @@ static memcached_return_t binary_read_one_response(org::libmemcached::Instance* case PROTOCOL_BINARY_CMD_DELETE: case PROTOCOL_BINARY_CMD_TOUCH: { - WATCHPOINT_ASSERT(bodylen == 0); + if (bodylen != 0) + { + char touch_buffer[32]; // @todo document this number + rc= memcached_safe_read(instance, buffer, sizeof(touch_buffer)); + } return MEMCACHED_SUCCESS; } diff --git a/tests/libmemcached-1.0/touch.cc b/tests/libmemcached-1.0/touch.cc index 9bd562a2..044273fd 100644 --- a/tests/libmemcached-1.0/touch.cc +++ b/tests/libmemcached-1.0/touch.cc @@ -88,8 +88,6 @@ test_return_t test_memcached_touch(memcached_st *memc) test_compare(MEMCACHED_SUCCESS, memcached_touch(memc, test_literal_param(__func__), 60 *60)); - test_skip(false ,memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL)); - rc= memcached_touch(memc, test_literal_param(__func__), 60 *60 *24 *60); test_compare(MEMCACHED_SUCCESS, rc); @@ -140,7 +138,6 @@ test_return_t test_memcached_touch_by_key(memcached_st *memc) test_literal_param(__func__), 60 *60)); - test_skip(false ,memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL)); test_compare(MEMCACHED_SUCCESS, memcached_touch_by_key(memc, test_literal_param("grouping_key"),