projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Fix how we do manpages.
[awesomized/libmemcached]
/
libmemcached
/
stats.cc
diff --git
a/libmemcached/stats.cc
b/libmemcached/stats.cc
index 49dfab018e4ac37cddf3891ece763670902a15de..29d9a425196ed195f913c4b76e95f9b33512e0ae 100644
(file)
--- a/
libmemcached/stats.cc
+++ b/
libmemcached/stats.cc
@@
-95,11
+95,11
@@
static memcached_return_t set_data(memcached_stat_st *memc_stat, const char *key
if (temp <= INT32_MAX and ( sizeof(pid_t) == sizeof(int32_t) ))
{
if (temp <= INT32_MAX and ( sizeof(pid_t) == sizeof(int32_t) ))
{
- memc_stat->pid=
temp
;
+ memc_stat->pid=
pid_t(temp)
;
}
else if (temp > -1)
{
}
else if (temp > -1)
{
- memc_stat->pid=
temp
;
+ memc_stat->pid=
pid_t(temp)
;
}
else
{
}
else
{
@@
-346,12
+346,14
@@
char *memcached_stat_get_value(const memcached_st *ptr, memcached_stat_st *memc_
static memcached_return_t binary_stats_fetch(memcached_stat_st *memc_stat,
const char *args,
const size_t args_length,
static memcached_return_t binary_stats_fetch(memcached_stat_st *memc_stat,
const char *args,
const size_t args_length,
-
memcached_server_write_instance_st
instance,
+
org::libmemcached::Instance*
instance,
struct local_context *check)
{
char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
protocol_binary_request_stats request= {}; // = {.bytes= {0}};
struct local_context *check)
{
char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
protocol_binary_request_stats request= {}; // = {.bytes= {0}};
- request.message.header.request.magic= PROTOCOL_BINARY_REQ;
+
+ initialize_binary_request(instance, request.message.header);
+
request.message.header.request.opcode= PROTOCOL_BINARY_CMD_STAT;
request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;
request.message.header.request.opcode= PROTOCOL_BINARY_CMD_STAT;
request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;
@@
-426,7
+428,7
@@
static memcached_return_t binary_stats_fetch(memcached_stat_st *memc_stat,
* memcached_response will decrement the counter, so I need to reset it..
* todo: look at this and try to find a better solution.
* */
* memcached_response will decrement the counter, so I need to reset it..
* todo: look at this and try to find a better solution.
* */
- instance->cursor_active= 0;
+ instance->cursor_active
_
= 0;
return MEMCACHED_SUCCESS;
}
return MEMCACHED_SUCCESS;
}
@@
-434,7
+436,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,
const char *args,
const size_t args_length,
static memcached_return_t ascii_stats_fetch(memcached_stat_st *memc_stat,
const char *args,
const size_t args_length,
-
memcached_server_write_instance_st
instance,
+
org::libmemcached::Instance*
instance,
struct local_context *check)
{
libmemcached_io_vector_st vector[]=
struct local_context *check)
{
libmemcached_io_vector_st vector[]=
@@
-550,7
+552,7
@@
memcached_stat_st *memcached_stat(memcached_st *self, char *args, memcached_retu
stat_instance->pid= -1;
stat_instance->root= self;
stat_instance->pid= -1;
stat_instance->root= self;
-
memcached_server_write_instance_st instance= memcached_server
_instance_fetch(self, x);
+
org::libmemcached::Instance* instance= memcached
_instance_fetch(self, x);
memcached_return_t temp_return;
if (memcached_is_binary(self))
memcached_return_t temp_return;
if (memcached_is_binary(self))
@@
-611,7
+613,7
@@
memcached_return_t memcached_stat_servername(memcached_stat_st *memc_stat, char
if (memcached_success(rc))
{
if (memcached_success(rc))
{
-
memcached_server_write_instance_st instance= memcached_server
_instance_fetch(memc_ptr, 0);
+
org::libmemcached::Instance* instance= memcached
_instance_fetch(memc_ptr, 0);
if (memc.flags.binary_protocol)
{
rc= binary_stats_fetch(memc_stat, args, args_length, instance, NULL);
if (memc.flags.binary_protocol)
{
rc= binary_stats_fetch(memc_stat, args, args_length, instance, NULL);
@@
-673,7
+675,7
@@
void memcached_stat_free(const memcached_st *, memcached_stat_st *memc_stat)
}
static memcached_return_t call_stat_fn(memcached_st *ptr,
}
static memcached_return_t call_stat_fn(memcached_st *ptr,
-
memcached_server_write_instance_st
instance,
+
org::libmemcached::Instance*
instance,
void *context)
{
memcached_return_t rc;
void *context)
{
memcached_return_t rc;