X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fdo.c;h=2fd1f3273ee5f2439fb13808d66997e5e5ed266c;hb=d70dd7ca2db0a4f7d7c63367466567cc1efe9f68;hp=d673f187149413b858014e0b91c67aebe52d2c4c;hpb=e42302e08fa4d04cb21eaf7493f5f92b11169c03;p=m6w6%2Flibmemcached diff --git a/libmemcached/do.c b/libmemcached/do.c index d673f187..2fd1f327 100644 --- a/libmemcached/do.c +++ b/libmemcached/do.c @@ -1,7 +1,18 @@ +/* LibMemcached + * Copyright (C) 2006-2010 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ + #include "common.h" -memcached_return_t memcached_do(memcached_server_st *ptr, const void *command, - size_t command_length, uint8_t with_flush) +memcached_return_t memcached_do(memcached_server_write_instance_st ptr, const void *command, + size_t command_length, bool with_flush) { memcached_return_t rc; ssize_t sent_length; @@ -21,9 +32,9 @@ memcached_return_t memcached_do(memcached_server_st *ptr, const void *command, ** otherwise we might get a partial write. **/ if (ptr->type == MEMCACHED_CONNECTION_UDP && with_flush && ptr->write_buffer_offset > UDP_DATAGRAM_HEADER_LENGTH) - memcached_io_write(ptr, NULL, 0, 1); + memcached_io_write(ptr, NULL, 0, true); - sent_length= memcached_io_write(ptr, command, command_length, (char) with_flush); + sent_length= memcached_io_write(ptr, command, command_length, with_flush); if (sent_length == -1 || (size_t)sent_length != command_length) rc= MEMCACHED_WRITE_FAILURE;