{
*value= 0;
rc= MEMCACHED_PROTOCOL_ERROR;
- }
+ }
else if (! strncmp(buffer, "CLIENT_ERROR\r\n", 14))
{
*value= 0;
request.message.body.initial= htonll(initial);
request.message.body.expiration= htonl((uint32_t) expiration);
- struct __write_vector_st vector[]=
+ struct libmemcached_io_vector_st vector[]=
{
{ .length= sizeof(request.bytes), .buffer= request.bytes },
{ .length= ptr->prefix_key_length, .buffer= ptr->prefix_key },
{ .length= key_length, .buffer= key }
- };
+ };
memcached_return_t rc;
if ((rc= memcached_vdo(instance, vector, 3, true)) != MEMCACHED_SUCCESS)
memcached_io_write(instance, NULL, 0, true);
}
- struct __write_vector_st vector[]=
+ struct libmemcached_io_vector_st vector[]=
{
{ .length= sizeof(request.bytes), .buffer= request.bytes},
{ .length= ptr->prefix_key_length, .buffer= ptr->prefix_key },
{ .length= key_length, .buffer= key },
- };
+ };
memcached_return_t rc= MEMCACHED_SUCCESS;
* Use and distribution licensed under the BSD license. See
* the COPYING file in the parent directory for full text.
*
- * Summary:
+ * Summary:
*
*/
#include "common.h"
-memcached_return_t memcached_do(memcached_server_write_instance_st ptr, const void *command,
+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;
}
memcached_return_t memcached_vdo(memcached_server_write_instance_st ptr,
- const struct __write_vector_st *vector, size_t count,
+ const struct libmemcached_io_vector_st *vector, size_t count,
bool with_flush)
{
memcached_return_t rc;
#endif
LIBMEMCACHED_LOCAL
-memcached_return_t memcached_do(memcached_server_write_instance_st ptr,
+memcached_return_t memcached_do(memcached_server_write_instance_st ptr,
const void *commmand,
size_t command_length,
bool with_flush);
LIBMEMCACHED_LOCAL
memcached_return_t memcached_vdo(memcached_server_write_instance_st ptr,
- const struct __write_vector_st *vector, size_t count,
+ const struct libmemcached_io_vector_st *vector, size_t count,
bool with_flush);
#ifdef __cplusplus
/* LibMemcached
- * Copyright (C) 2006-2009 Brian Aker
+ * Copyright (C) 2006-2009 Brian Aker
* All rights reserved.
*
* Use and distribution licensed under the BSD license. See
instance= memcached_server_instance_fetch(ptr, server_key);
- struct __write_vector_st vector[]=
- {
- { .length= get_command_length, .buffer= get_command },
- { .length= ptr->prefix_key_length, .buffer= ptr->prefix_key },
- { .length= key_length[x], .buffer= keys[x] },
- { .length= 1, .buffer= " " }
- };
+ struct libmemcached_io_vector_st vector[]=
+ {
+ { .length= get_command_length, .buffer= get_command },
+ { .length= ptr->prefix_key_length, .buffer= ptr->prefix_key },
+ { .length= key_length[x], .buffer= keys[x] },
+ { .length= 1, .buffer= " " }
+ };
if (memcached_server_response_count(instance) == 0)
request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;
request.message.header.request.bodylen= htonl((uint32_t)( key_length[x] + ptr->prefix_key_length));
- struct __write_vector_st vector[]=
+ struct libmemcached_io_vector_st vector[]=
{
{ .length= sizeof(request.bytes), .buffer= request.bytes },
{ .length= ptr->prefix_key_length, .buffer= ptr->prefix_key },
{ .length= key_length[x], .buffer= keys[x] }
- };
+ };
if (memcached_io_writev(instance, vector, 3, flush) == -1)
{
* that we might have processed some of the responses etc. For now,
* just make sure we work _correctly_
*/
- struct __write_vector_st vector[]=
+ struct libmemcached_io_vector_st vector[]=
{
{ .length= sizeof(request.bytes), .buffer= request.bytes },
{ .length= ptr->prefix_key_length, .buffer= ptr->prefix_key },
{ .length= key_length[x], .buffer= keys[x] }
- };
+ };
if (memcached_io_writev(instance, vector, 3, true) == -1)
{
}
ssize_t memcached_io_writev(memcached_server_write_instance_st ptr,
- const struct __write_vector_st *vector,
+ const struct libmemcached_io_vector_st *vector,
size_t number_of, bool with_flush)
{
ssize_t total= 0;
uint16_t reserved;
};
-struct __write_vector_st
+struct libmemcached_io_vector_st
{
size_t length;
const void *buffer;
LIBMEMCACHED_LOCAL
ssize_t memcached_io_writev(memcached_server_write_instance_st ptr,
- const struct __write_vector_st *vector,
+ const struct libmemcached_io_vector_st *vector,
size_t number_of, bool with_flush);
LIBMEMCACHED_LOCAL
do {
/* send the packet */
- struct __write_vector_st vector[]=
+ struct libmemcached_io_vector_st vector[]=
{
{ .length= sizeof(request.bytes), .buffer= request.bytes },
{ .length= keylen, .buffer= chosenmech },
request.message.header.request.keylen= htons((uint16_t)len);
request.message.header.request.bodylen= htonl((uint32_t) len);
- struct __write_vector_st vector[]=
+ struct libmemcached_io_vector_st vector[]=
{
{ .length= sizeof(request.bytes), .buffer= request.bytes },
{ .length= len, .buffer= args }
- };
+ };
if (memcached_vdo(instance, vector, 2, true) != MEMCACHED_SUCCESS)
{
WATCHPOINT_ASSERT(0);
}
}
-
+
if (check && check->func)
{
size_t key_length= strlen(buffer);
}
else
{
- struct __write_vector_st vector[]=
+ struct libmemcached_io_vector_st vector[]=
{
{ .length= write_length, .buffer= buffer },
{ .length= value_length, .buffer= value },
{ .length= 2, .buffer= "\r\n" }
- };
+ };
if (ptr->flags.buffer_requests && verb == SET_OP)
{
}
}
- struct __write_vector_st vector[]=
+ struct libmemcached_io_vector_st vector[]=
{
{ .length= send_length, .buffer= request.bytes },
{ .length= ptr->prefix_key_length, .buffer= ptr->prefix_key },
{ .length= key_length, .buffer= key },
{ .length= value_length, .buffer= value }
- };
+ };
/* write the header */
memcached_return_t rc;