projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Fixed mget_execute possibly failing into some non ending recursive call
[awesomized/libmemcached]
/
libmemcached
/
memcached_response.c
diff --git
a/libmemcached/memcached_response.c
b/libmemcached/memcached_response.c
index ea13bb151ce09065cd37f4d958206a7140d1465b..01db41690978ba501b3254809f245d6a0ce0fc80 100644
(file)
--- a/
libmemcached/memcached_response.c
+++ b/
libmemcached/memcached_response.c
@@
-44,7
+44,7
@@
memcached_return memcached_response(memcached_server_st *ptr,
memcached_result_st *result)
{
/* We may have old commands in the buffer not set, first purge */
memcached_result_st *result)
{
/* We may have old commands in the buffer not set, first purge */
- if (
ptr->root->flags & MEM_NO_BLOCK
)
+ if (
(ptr->root->flags & MEM_NO_BLOCK) && (!ptr->root->processing_input)
)
(void)memcached_io_write(ptr, NULL, 0, 1);
/*
(void)memcached_io_write(ptr, NULL, 0, 1);
/*
@@
-356,8
+356,14
@@
static memcached_return binary_read_one_response(memcached_server_st *ptr,
{
switch (header.response.opcode)
{
{
switch (header.response.opcode)
{
- case PROTOCOL_BINARY_CMD_GETK:
case PROTOCOL_BINARY_CMD_GETKQ:
case PROTOCOL_BINARY_CMD_GETKQ:
+ /*
+ * We didn't increment the response counter for the GETKQ packet
+ * (only the final NOOP), so we need to increment the counter again.
+ */
+ memcached_server_response_increment(ptr);
+ /* FALLTHROUGH */
+ case PROTOCOL_BINARY_CMD_GETK:
{
uint16_t keylen= header.response.keylen;
memcached_result_reset(result);
{
uint16_t keylen= header.response.keylen;
memcached_result_reset(result);