First merge of Trond's patches (cherry picking).
[m6w6/libmemcached] / libmemcached / memcached_do.c
index b46805a02acc0c6219beb2620c7ef7bbf8b45929..d673f187149413b858014e0b91c67aebe52d2c4c 100644 (file)
@@ -1,9 +1,9 @@
 #include "common.h"
 
-memcached_return memcached_do(memcached_server_st *ptr, const void *command, 
-                              size_t command_length, uint8_t with_flush)
+memcached_return_t memcached_do(memcached_server_st *ptr, const void *command, 
+                                size_t command_length, uint8_t with_flush)
 {
-  memcached_return rc;
+  memcached_return_t rc;
   ssize_t sent_length;
 
   WATCHPOINT_ASSERT(command_length);
@@ -23,11 +23,11 @@ memcached_return memcached_do(memcached_server_st *ptr, const void *command,
   if (ptr->type == MEMCACHED_CONNECTION_UDP && with_flush && ptr->write_buffer_offset > UDP_DATAGRAM_HEADER_LENGTH)
     memcached_io_write(ptr, NULL, 0, 1);
 
-  sent_length= memcached_io_write(ptr, command, command_length, with_flush);
+  sent_length= memcached_io_write(ptr, command, command_length, (char) with_flush);
 
   if (sent_length == -1 || (size_t)sent_length != command_length)
     rc= MEMCACHED_WRITE_FAILURE;
-  else if ((ptr->root->flags & MEM_NOREPLY) == 0)
+  else if ((ptr->root->flags.no_reply) == 0)
     memcached_server_response_increment(ptr);
 
   return rc;