From ad4061002cfbd6fa3bdffcd526f61242858866b4 Mon Sep 17 00:00:00 2001 From: Thomas Winget Date: Tue, 22 Jul 2014 20:54:45 -0400 Subject: Missed serializing a get_connections RPC response parameter --- src/rpc/core_rpc_server_commands_defs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h index 39acadb04..bd8aff706 100644 --- a/src/rpc/core_rpc_server_commands_defs.h +++ b/src/rpc/core_rpc_server_commands_defs.h @@ -495,6 +495,7 @@ namespace cryptonote std::list connections; BEGIN_KV_SERIALIZE_MAP() + KV_SERIALIZE(status) KV_SERIALIZE(connections) END_KV_SERIALIZE_MAP() }; -- cgit v1.2.3 From a99143444c9b67b4bf591ebd66ddec2e79d55407 Mon Sep 17 00:00:00 2001 From: Thomas Winget Date: Wed, 23 Jul 2014 05:59:31 -0400 Subject: Changed time_t to uint64_t for serialization time_t is implementation-, architecture-, and apparently compiler-dependent. As an example, on my machine if I build a 64-bit binary, sizeof(time_t) is 8, but for a 32-bit binary it's 4. uint64_t is therefore much more consistent for serialization, given that RPC calls are potentially made between different machines. --- src/cryptonote_protocol/cryptonote_protocol_defs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cryptonote_protocol/cryptonote_protocol_defs.h b/src/cryptonote_protocol/cryptonote_protocol_defs.h index eddb3b67b..850108858 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_defs.h +++ b/src/cryptonote_protocol/cryptonote_protocol_defs.h @@ -27,14 +27,14 @@ namespace cryptonote std::string peer_id; uint64_t recv_count; - time_t recv_idle_time; + uint64_t recv_idle_time; uint64_t send_count; - time_t send_idle_time; + uint64_t send_idle_time; std::string state; - time_t live_time; + uint64_t live_time; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE(incoming) -- cgit v1.2.3