summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaksim Zhylinski <uzzable@gmail.com>2012-07-18 17:22:16 +0300
committerdormando <dormando@rydia.net>2012-07-29 17:05:06 -0700
commit045da59d01eefdb0ff8faf9d3a28e03ba78cbc80 (patch)
tree3005dd08d0afb4c7c1d1b530f5160e9bc1142e01
parent7051da932fb220845f318fd7f21ce87136d119b3 (diff)
downloadmemcached-045da59d01eefdb0ff8faf9d3a28e03ba78cbc80.tar.gz
Fixed issue with invalid binary protocol touch command expiration time
(http://code.google.com/p/memcached/issues/detail?id=275)
-rw-r--r--memcached.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/memcached.c b/memcached.c
index 6c18254..e3ca9ff 100644
--- a/memcached.c
+++ b/memcached.c
@@ -1197,8 +1197,8 @@ static void process_bin_touch(conn *c) {
protocol_binary_response_get* rsp = (protocol_binary_response_get*)c->wbuf;
char* key = binary_get_key(c);
size_t nkey = c->binary_header.request.keylen;
- protocol_binary_request_touch *t = (void *)&c->binary_header;
- uint32_t exptime = ntohl(t->message.body.expiration);
+ protocol_binary_request_touch *t = binary_get_request(c);
+ time_t exptime = ntohl(t->message.body.expiration);
if (settings.verbose > 1) {
int ii;