buffer_end= MAX_UDP_DATAGRAM_LENGTH;
should_write= length;
if (ptr->write_buffer_offset + should_write > buffer_end)
+ {
+ fprintf(stderr, "%s:%d (%s)\n", __FILE__, __LINE__,__func__);fflush(stdout);
return -1;
+ }
}
else
{
WATCHPOINT_ASSERT(ptr->fd != INVALID_SOCKET);
sent_length= io_flush(ptr, &rc);
if (sent_length == -1)
+ {
+ fprintf(stderr, "%s:%d (%s)\n", __FILE__, __LINE__,__func__);fflush(stdout);
return -1;
+ }
/* If io_flush calls memcached_purge, sent_length may be 0 */
unlikely (sent_length != 0)
WATCHPOINT_ASSERT(ptr->fd != INVALID_SOCKET);
if (io_flush(ptr, &rc) == -1)
{
+ fprintf(stderr, "%s:%d (%s)\n", __FILE__, __LINE__,__func__);fflush(stdout);
return -1;
}
rc= memcached_purge(ptr);
if (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_STORED)
+ {
+ fprintf(stderr, "%s:%d (%s)\n", __FILE__, __LINE__,__func__);fflush(stdout);
return -1;
+ }
}
ssize_t sent_length;
size_t return_length;
// UDP Sanity check, make sure that we are not sending somthing too big
if (ptr->type == MEMCACHED_CONNECTION_UDP && write_length > MAX_UDP_DATAGRAM_LENGTH)
+ {
+ fprintf(stderr, "%s:%d (%s)\n", __FILE__, __LINE__,__func__);fflush(stdout);
return -1;
+ }
if (ptr->write_buffer_offset == 0 || (ptr->type == MEMCACHED_CONNECTION_UDP
&& ptr->write_buffer_offset == UDP_DATAGRAM_HEADER_LENGTH))
continue;
memcached_quit_server(ptr, true);
+ fprintf(stderr, "%s:%d (%s)\n", __FILE__, __LINE__,__func__);fflush(stdout);
return -1;
}
default:
memcached_quit_server(ptr, true);
*error= MEMCACHED_ERRNO;
+ fprintf(stderr, "%s:%d (%s)\n", __FILE__, __LINE__,__func__);fflush(stdout);
return -1;
}
}
(size_t)sent_length != write_length)
{
memcached_quit_server(ptr, true);
+ fprintf(stderr, "%s:%d (%s)\n", __FILE__, __LINE__,__func__);fflush(stdout);
return -1;
}