Add a request id for each request that hits the wire.
[m6w6/libmemcached] / libmemcached / flush.cc
index 6b8ea4b0815a7b6ae4daf7bfd4832a1aff934f94..0c6141d8c121920a60ed4f32ca5a5880ab64ba81 100644 (file)
@@ -42,7 +42,6 @@ static memcached_return_t memcached_flush_binary(memcached_st *ptr,
 {
   protocol_binary_request_flush request= {};
 
-  request.message.header.request.magic= (uint8_t)PROTOCOL_BINARY_REQ;
   request.message.header.request.opcode= PROTOCOL_BINARY_CMD_FLUSH;
   request.message.header.request.extlen= 4;
   request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;
@@ -54,6 +53,7 @@ static memcached_return_t memcached_flush_binary(memcached_st *ptr,
   for (uint32_t x= 0; x < memcached_server_count(ptr); x++)
   {
     memcached_server_write_instance_st instance= memcached_server_instance_fetch(ptr, x);
+    initialize_binary_request(instance, request.message.header);
 
     if (reply)
     {