projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Added missing constant.
[m6w6/libmemcached]
/
libmemcached
/
stats.c
diff --git
a/libmemcached/stats.c
b/libmemcached/stats.c
index e38445ec1f5df2f37affc11aa3e401649189625e..fcafe2154c910ca47f29c3e6b76f59fb133f1421 100644
(file)
--- a/
libmemcached/stats.c
+++ b/
libmemcached/stats.c
@@
-151,7
+151,8
@@
static memcached_return_t set_data(memcached_stat_st *memc_stat, char *key, char
strcmp("listen_disabled_num", key) == 0 ||
strcmp("conn_yields", key) == 0 ||
strcmp("auth_cmds", key) == 0 ||
strcmp("listen_disabled_num", key) == 0 ||
strcmp("conn_yields", key) == 0 ||
strcmp("auth_cmds", key) == 0 ||
- strcmp("auth_errors", key) == 0))
+ strcmp("auth_errors", key) == 0 ||
+ strcmp("reclaimed", key) == 0))
{
WATCHPOINT_STRING(key);
return MEMCACHED_UNKNOWN_STAT_KEY;
{
WATCHPOINT_STRING(key);
return MEMCACHED_UNKNOWN_STAT_KEY;
@@
-160,7
+161,7
@@
static memcached_return_t set_data(memcached_stat_st *memc_stat, char *key, char
return MEMCACHED_SUCCESS;
}
return MEMCACHED_SUCCESS;
}
-char *memcached_stat_get_value(memcached_st *ptr, memcached_stat_st *memc_stat,
+char *memcached_stat_get_value(
const
memcached_st *ptr, memcached_stat_st *memc_stat,
const char *key, memcached_return_t *error)
{
char buffer[SMALL_STRING_LEN];
const char *key, memcached_return_t *error)
{
char buffer[SMALL_STRING_LEN];
@@
-228,7
+229,7
@@
char *memcached_stat_get_value(memcached_st *ptr, memcached_stat_st *memc_stat,
static memcached_return_t binary_stats_fetch(memcached_stat_st *memc_stat,
char *args,
static memcached_return_t binary_stats_fetch(memcached_stat_st *memc_stat,
char *args,
- memcached_server_
instance_st *
instance)
+ memcached_server_
write_instance_st
instance)
{
memcached_return_t rc;
{
memcached_return_t rc;
@@
-250,7
+251,7
@@
static memcached_return_t binary_stats_fetch(memcached_stat_st *memc_stat,
request.message.header.request.bodylen= htonl((uint32_t) len);
if ((memcached_do(instance, request.bytes,
request.message.header.request.bodylen= htonl((uint32_t) len);
if ((memcached_do(instance, request.bytes,
- sizeof(request.bytes),
0
) != MEMCACHED_SUCCESS) ||
+ sizeof(request.bytes),
false
) != MEMCACHED_SUCCESS) ||
(memcached_io_write(instance, args, len, true) == -1))
{
memcached_io_reset(instance);
(memcached_io_write(instance, args, len, true) == -1))
{
memcached_io_reset(instance);
@@
-260,7
+261,7
@@
static memcached_return_t binary_stats_fetch(memcached_stat_st *memc_stat,
else
{
if (memcached_do(instance, request.bytes,
else
{
if (memcached_do(instance, request.bytes,
- sizeof(request.bytes),
1
) != MEMCACHED_SUCCESS)
+ sizeof(request.bytes),
true
) != MEMCACHED_SUCCESS)
{
memcached_io_reset(instance);
return MEMCACHED_WRITE_FAILURE;
{
memcached_io_reset(instance);
return MEMCACHED_WRITE_FAILURE;
@@
-298,7
+299,7
@@
static memcached_return_t binary_stats_fetch(memcached_stat_st *memc_stat,
static memcached_return_t ascii_stats_fetch(memcached_stat_st *memc_stat,
char *args,
static memcached_return_t ascii_stats_fetch(memcached_stat_st *memc_stat,
char *args,
- memcached_server_
instance_st *
instance)
+ memcached_server_
write_instance_st
instance)
{
memcached_return_t rc;
char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
{
memcached_return_t rc;
char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
@@
-314,7
+315,7
@@
static memcached_return_t ascii_stats_fetch(memcached_stat_st *memc_stat,
if (send_length >= MEMCACHED_DEFAULT_COMMAND_SIZE)
return MEMCACHED_WRITE_FAILURE;
if (send_length >= MEMCACHED_DEFAULT_COMMAND_SIZE)
return MEMCACHED_WRITE_FAILURE;
- rc= memcached_do(instance, buffer, send_length,
1
);
+ rc= memcached_do(instance, buffer, send_length,
true
);
if (rc != MEMCACHED_SUCCESS)
goto error;
if (rc != MEMCACHED_SUCCESS)
goto error;
@@
-378,7
+379,7
@@
memcached_stat_st *memcached_stat(memcached_st *ptr, char *args, memcached_retur
for (uint32_t x= 0; x < memcached_server_count(ptr); x++)
{
memcached_return_t temp_return;
for (uint32_t x= 0; x < memcached_server_count(ptr); x++)
{
memcached_return_t temp_return;
- memcached_server_
instance_st *
instance;
+ memcached_server_
write_instance_st
instance;
memcached_stat_st *stat_instance;
stat_instance= stats + x;
memcached_stat_st *stat_instance;
stat_instance= stats + x;
@@
-410,7
+411,9
@@
memcached_return_t memcached_stat_servername(memcached_stat_st *memc_stat, char
memcached_return_t rc;
memcached_st memc;
memcached_st *memc_ptr;
memcached_return_t rc;
memcached_st memc;
memcached_st *memc_ptr;
- memcached_server_instance_st *instance;
+ memcached_server_write_instance_st instance;
+
+ memset(memc_stat, 0, sizeof(memcached_stat_st));
memc_ptr= memcached_create(&memc);
WATCHPOINT_ASSERT(memc_ptr);
memc_ptr= memcached_create(&memc);
WATCHPOINT_ASSERT(memc_ptr);
@@
-437,7
+440,7
@@
memcached_return_t memcached_stat_servername(memcached_stat_st *memc_stat, char
We make a copy of the keys since at some point in the not so distant future
we will add support for "found" keys.
*/
We make a copy of the keys since at some point in the not so distant future
we will add support for "found" keys.
*/
-char ** memcached_stat_get_keys(memcached_st *ptr,
+char ** memcached_stat_get_keys(
const
memcached_st *ptr,
memcached_stat_st *memc_stat,
memcached_return_t *error)
{
memcached_stat_st *memc_stat,
memcached_return_t *error)
{
@@
-461,7
+464,7
@@
char ** memcached_stat_get_keys(memcached_st *ptr,
return list;
}
return list;
}
-void memcached_stat_free(memcached_st *ptr, memcached_stat_st *memc_stat)
+void memcached_stat_free(
const
memcached_st *ptr, memcached_stat_st *memc_stat)
{
if (memc_stat == NULL)
{
{
if (memc_stat == NULL)
{