From 5aa8de3e62fd4bc71b05294215b9d4bd67212527 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Thu, 18 Jun 2015 10:19:36 +0000 Subject: [PATCH] Fixed uninitialized members of bdProxyId and bdConnectionRequest. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8515 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libbitdht/src/bitdht/bdconnection.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/libbitdht/src/bitdht/bdconnection.h b/libbitdht/src/bitdht/bdconnection.h index 989e09eb0..4453a0bf0 100644 --- a/libbitdht/src/bitdht/bdconnection.h +++ b/libbitdht/src/bitdht/bdconnection.h @@ -151,12 +151,11 @@ class bdConnection class bdProxyId { - public: - +public: bdProxyId(const bdId &in_id, uint32_t in_srctype, uint32_t in_errcode) :id(in_id), srcType(in_srctype), errcode(in_errcode) { return; } - bdProxyId() :srcType(BD_PI_SRC_UNKNOWN) { return; } + bdProxyId() :srcType(BD_PI_SRC_UNKNOWN), errcode(0) { return; } std::string proxySrcType() const; @@ -168,7 +167,13 @@ class bdProxyId class bdConnectionRequest { - public: +public: + bdConnectionRequest() : mMode(0), mState(0), mStateTS(0), mPauseTS(0), mErrCode(0), mDelay(0), mRequestTS(0), mRecycled(0), mCurrentSrcType(0) + { + bdsockaddr_clear(&mLocalAddr); + } + +public: int setupDirectConnection(struct sockaddr_in *laddr, bdNodeId *target); int setupProxyConnection(struct sockaddr_in *laddr, bdNodeId *target, uint32_t mode, uint32_t delay);