projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
After quit is issued, client reads all data from server,
[m6w6/libmemcached]
/
src
/
memstat.c
diff --git
a/src/memstat.c
b/src/memstat.c
index 40aade209435daa74e62e3845d5948e6b3cbf4eb..540d3f4fe27c0349d8da1aa92993e0e7360035e9 100644
(file)
--- a/
src/memstat.c
+++ b/
src/memstat.c
@@
-4,6
+4,8
@@
#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
+#include <string.h>
+#include <assert.h>
#include <getopt.h>
#include <memcached.h>
#include <getopt.h>
#include <memcached.h>
@@
-39,7
+41,10
@@
int main(int argc, char *argv[])
if ((temp= getenv("MEMCACHED_SERVERS")))
opt_servers= strdup(temp);
else
if ((temp= getenv("MEMCACHED_SERVERS")))
opt_servers= strdup(temp);
else
+ {
+ fprintf(stderr, "No Servers provided\n");
exit(1);
exit(1);
+ }
}
memc= memcached_create(NULL);
}
memc= memcached_create(NULL);
@@
-50,7
+55,7
@@
int main(int argc, char *argv[])
stat= memcached_stat(memc, NULL, &rc);
stat= memcached_stat(memc, NULL, &rc);
- if (rc != MEMCACHED_SUCCESS && rc
=
= MEMCACHED_SOME_ERRORS)
+ if (rc != MEMCACHED_SUCCESS && rc
!
= MEMCACHED_SOME_ERRORS)
{
printf("Failure to communicate with servers (%s)\n",
memcached_strerror(memc, rc));
{
printf("Failure to communicate with servers (%s)\n",
memcached_strerror(memc, rc));