projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Merge in 1.0.3
[awesomized/libmemcached]
/
libmemcached
/
storage.cc
diff --git
a/libmemcached/storage.cc
b/libmemcached/storage.cc
index 0ce4ea61a3f939b7aadfc93a10122cfac16e7b17..2d0ae8fc5b4ce7e2693fd61fe84a30c0113a8509 100644
(file)
--- a/
libmemcached/storage.cc
+++ b/
libmemcached/storage.cc
@@
-290,20
+290,22
@@
static memcached_return_t memcached_send_ascii(memcached_st *ptr,
/* Send command header */
memcached_return_t rc= memcached_vdo(instance, vector, 12, flush);
/* Send command header */
memcached_return_t rc= memcached_vdo(instance, vector, 12, flush);
- if (rc == MEMCACHED_SUCCESS)
+
+ // If we should not reply, return with MEMCACHED_SUCCESS, unless error
+ if (reply == false)
{
{
- if (flush == false)
- {
- return MEMCACHED_BUFFERED;
- }
+ return memcached_success(rc) ? MEMCACHED_SUCCESS : rc;
+ }
-
if (reply
== false)
-
{
- return MEMCACHED_SUCCESS;
-
}
+
if (flush
== false)
+ {
+ return memcached_success(rc) ? MEMCACHED_BUFFERED : rc;
+ }
+ if (rc == MEMCACHED_SUCCESS)
+ {
char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
- rc= memcached_response(instance, buffer,
MEMCACHED_DEFAULT_COMMAND_SIZE
, NULL);
+ rc= memcached_response(instance, buffer,
sizeof(buffer)
, NULL);
if (rc == MEMCACHED_STORED)
{
if (rc == MEMCACHED_STORED)
{