projects
/
m6w6
/
libmemcached
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (from parent 1:
6bd49a9
)
Silently ignore the new stats fields
author
Trond Norbye
<trond.norbye@sun.com>
Fri, 13 Mar 2009 09:54:04 +0000
(10:54 +0100)
committer
Trond Norbye
<trond.norbye@sun.com>
Fri, 13 Mar 2009 09:54:04 +0000
(10:54 +0100)
The 1.3 beta includes new stats elements, so libmemcached will print out
multiple error messages when you issue the stats call.
memcached_stat_st is publicly available, so we cannot add new members to
the struct without breaking binary compatibility.
libmemcached/memcached_stats.c
patch
|
blob
|
history
diff --git
a/libmemcached/memcached_stats.c
b/libmemcached/memcached_stats.c
index 3ad236d2108c347f8eb778c52e7211442b8cc222..1c8c174f8c5d333f33ca95ea891b7065a1cadfa5 100644
(file)
--- a/
libmemcached/memcached_stats.c
+++ b/
libmemcached/memcached_stats.c
@@
-136,7
+136,15
@@
static void set_data(memcached_stat_st *stat, char *key, char *value)
{
stat->threads= strtol(value, (char **)NULL, 10);
}
{
stat->threads= strtol(value, (char **)NULL, 10);
}
- else
+ else if (!(strcmp("delete_misses", key) == 0 ||/* New stats in the 1.3 beta */
+ strcmp("delete_hits", key) == 0 ||/* Just swallow them for now.. */
+ strcmp("incr_misses", key) == 0 ||
+ strcmp("incr_hits", key) == 0 ||
+ strcmp("decr_misses", key) == 0 ||
+ strcmp("decr_hits", key) == 0 ||
+ strcmp("cas_misses", key) == 0 ||
+ strcmp("cas_hits", key) == 0 ||
+ strcmp("cas_badval", key) == 0))
{
fprintf(stderr, "Unknown key %s\n", key);
}
{
fprintf(stderr, "Unknown key %s\n", key);
}