projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Fixed bug reported by Stuart Midgley about what happens when there are no
[awesomized/libmemcached]
/
lib
/
memcached_flush.c
diff --git
a/lib/memcached_flush.c
b/lib/memcached_flush.c
index 41b193fc3f9ac6a3ff4c8196aa00bd86fd03bc51..58f5bff2d8919be99c7d7a09e738f984f109bf02 100644
(file)
--- a/
lib/memcached_flush.c
+++ b/
lib/memcached_flush.c
@@
-8,7
+8,10
@@
memcached_return memcached_flush(memcached_st *ptr, time_t expiration)
char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
LIBMEMCACHED_MEMCACHED_FLUSH_START();
char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
LIBMEMCACHED_MEMCACHED_FLUSH_START();
- rc= memcached_connect(ptr);
+ rc= memcached_connect(ptr, 0);
+
+ if (rc == MEMCACHED_NO_SERVERS)
+ return rc;
if (rc != MEMCACHED_SUCCESS)
rc= MEMCACHED_SOME_ERRORS;
if (rc != MEMCACHED_SUCCESS)
rc= MEMCACHED_SOME_ERRORS;