X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=lib%2Fmemcached_storage.c;h=38d6d0db3ca689ccb75d3717bdef30930ab488a9;hb=b1daf61bf1665041f30fff7c96d61de4658f8db3;hp=4c36edc6dfc8ff2b8af9222410eef0b4aba3fab3;hpb=b1d5d8be2237f04ccc99939399ebe7efad3f684e;p=m6w6%2Flibmemcached diff --git a/lib/memcached_storage.c b/lib/memcached_storage.c index 4c36edc6..38d6d0db 100644 --- a/lib/memcached_storage.c +++ b/lib/memcached_storage.c @@ -20,7 +20,7 @@ typedef enum { } memcached_storage_action; /* Inline this */ -char *storage_op_string(memcached_storage_action verb) +static char *storage_op_string(memcached_storage_action verb) { switch (verb) { @@ -96,7 +96,7 @@ static inline memcached_return memcached_send(memcached_st *ptr, goto error; } - if ((ptr->flags & MEM_NO_BLOCK) && verb == SET_OP) + if ((ptr->flags & MEM_BUFFER_REQUESTS) && verb == SET_OP) to_write= 0; else to_write= 1; @@ -108,9 +108,9 @@ static inline memcached_return memcached_send(memcached_st *ptr, } if (to_write == 0) - rc= MEMCACHED_SUCCESS; - else - rc= memcached_response(ptr, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL, server_key); + return MEMCACHED_BUFFERED; + + rc= memcached_response(ptr, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL, server_key); if (rc == MEMCACHED_STORED) return MEMCACHED_SUCCESS;