Skip to content

Commit

Permalink
msg/xio/XioConnection.h: init some member variables in ctor
Browse files Browse the repository at this point in the history
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
  • Loading branch information
dalgaaf committed Feb 19, 2016
1 parent a55f8c2 commit 4213b86
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/msg/xio/XioConnection.h
Expand Up @@ -96,7 +96,9 @@ class XioConnection : public Connection
uint32_t in_seq, out_seq_acked; // atomic<uint64_t>, got receipt
atomic_t out_seq; // atomic<uint32_t>

lifecycle() : state(lifecycle::INIT), in_seq(0), out_seq(0) {}
lifecycle() : state(lifecycle::INIT), reconnects(0), connect_seq(0),
peer_global_seq(0), in_seq(0), out_seq_acked(0),
out_seq(0) {}

void set_in_seq(uint32_t seq) {
in_seq = seq;
Expand Down Expand Up @@ -143,11 +145,18 @@ class XioConnection : public Connection
uint32_t flags;

explicit CState(XioConnection* _xcon)
: xcon(_xcon),
: features(0),
authorizer(NULL),
xcon(_xcon),
protocol_version(0),
session_state(INIT),
startup_state(IDLE),
reconnects(0),
connect_seq(0),
global_seq(0),
peer_global_seq(0),
in_seq(0),
out_seq_acked(0),
out_seq(0),
flags(FLAG_NONE) {}

Expand Down

0 comments on commit 4213b86

Please sign in to comment.