static memcached_return_t connect_poll(memcached_server_st *ptr)
{
struct pollfd fds[1];
- fds[0].fd = ptr->fd;
- fds[0].events = POLLOUT;
+ fds[0].fd= ptr->fd;
+ fds[0].events= POLLOUT;
size_t loop_max= 5;
static inline void set_socket_nonblocking(memcached_server_st *ptr)
{
#ifdef WIN32
- u_long arg = 1;
+ u_long arg= 1;
if (ioctlsocket(ptr->fd, FIONBIO, &arg) == SOCKET_ERROR)
{
memcached_set_errno(*ptr, get_socket_errno(), NULL);
// this should indicate end
string= memcached_fetch(memc, key, &key_length, &string_length, &flags, &rc);
- test_true(rc == MEMCACHED_END);
+ test_compare(MEMCACHED_END, rc);
return TEST_SUCCESS;
}
memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_NO_BLOCK, set);
memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_TCP_NODELAY, set);
- int32_t timeout= 0;
- memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, (uint64_t)timeout);
+ memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, uint64_t(0));
char *value= (char*)malloc(value_length * sizeof(char));