projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Removing all of the multi-set bits (aka the buffer code is faster, so why
[m6w6/libmemcached]
/
lib
/
memcached_io.c
diff --git
a/lib/memcached_io.c
b/lib/memcached_io.c
index 84928d2b40b5459e42acd1c7160d2e4d0a0acd31..05974ed5c5622637f99fbae2933ac0f488f6946f 100644
(file)
--- a/
lib/memcached_io.c
+++ b/
lib/memcached_io.c
@@
-57,7
+57,7
@@
void memcached_io_preread(memcached_st *ptr)
for (x= 0; x < ptr->number_of_hosts; x++)
{
for (x= 0; x < ptr->number_of_hosts; x++)
{
- if (
ptr->hosts[x].cursor_active
&&
+ if (
memcached_server_response_count(ptr, x)
&&
ptr->hosts[x].read_data_length < MEMCACHED_MAX_BUFFER )
{
size_t data_read;
ptr->hosts[x].read_data_length < MEMCACHED_MAX_BUFFER )
{
size_t data_read;
@@
-118,7
+118,9
@@
ssize_t memcached_io_read(memcached_st *ptr, unsigned int server_key,
}
else if (data_read)
break;
}
else if (data_read)
break;
- /* If zero, just keep looping */
+ /* If zero, just keep looping unless testing, then assert() */
+ else
+ WATCHPOINT_ASSERT(0);
}
ptr->hosts[server_key].read_data_length= data_read;
}
ptr->hosts[server_key].read_data_length= data_read;