{ memcached_literal_param("touch ") },
{ memcached_array_string(instance->root->_namespace), memcached_array_size(instance->root->_namespace) },
{ key, key_length },
- { expiration_buffer, expiration_buffer_length },
+ { expiration_buffer, size_t(expiration_buffer_length) },
{ memcached_literal_param("\r\n") }
};
time_t expiration)
{
protocol_binary_request_touch request= {}; //{.bytes= {0}};
- request.message.header.request.magic= PROTOCOL_BINARY_REQ;
+
+ initialize_binary_request(instance, request.message.header);
+
request.message.header.request.opcode= PROTOCOL_BINARY_CMD_TOUCH;
request.message.header.request.extlen= 4;
request.message.header.request.keylen= htons((uint16_t)(key_length +memcached_array_size(instance->root->_namespace)));
if (memcached_failed(rc= memcached_validate_key_length(key_length, ptr->flags.binary_protocol)))
{
- return memcached_set_error(*ptr, rc, MEMCACHED_AT);
+ return rc;
}
uint32_t server_key= memcached_generate_hash_with_redistribution(ptr, group_key, group_key_length);