f310a5bc3f9306e46392e2fa691e3f278e3d32dc
3 memcached_return
memcached_do(memcached_st
*ptr
, unsigned int server_key
, char *command
,
4 size_t command_length
, char with_flush
)
9 WATCHPOINT_ASSERT(command_length
);
10 WATCHPOINT_ASSERT(command
);
12 if (ptr
->hosts
[server_key
].cursor_active
)
15 rc
= memcached_finish_server(ptr
, server_key
);
16 ptr
->hosts
[server_key
].cursor_active
= 0;
19 if ((rc
= memcached_connect(ptr
, server_key
)) != MEMCACHED_SUCCESS
)
22 sent_length
= memcached_io_write(ptr
, server_key
, command
, command_length
, with_flush
);
24 if (sent_length
== -1 || sent_length
!= command_length
)
26 memcached_quit_server(ptr
, server_key
);
27 rc
= MEMCACHED_WRITE_FAILURE
;