From 5a5c0264d01df82a1d3414e024caf35c741b92e9 Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 26 Jan 2012 20:03:54 +0000 Subject: [PATCH] fixed uninitialized values git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4848 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/pqi/p3linkmgr.cc | 1 + libretroshare/src/pqi/pqinetstatebox.cc | 10 ++++++++++ libretroshare/src/services/p3chatservice.cc | 1 + 3 files changed, 12 insertions(+) diff --git a/libretroshare/src/pqi/p3linkmgr.cc b/libretroshare/src/pqi/p3linkmgr.cc index 8ef5b761f..dfb0ff5ee 100644 --- a/libretroshare/src/pqi/p3linkmgr.cc +++ b/libretroshare/src/pqi/p3linkmgr.cc @@ -2144,6 +2144,7 @@ int p3LinkMgrIMPL::addFriend(const std::string &id, bool isVisible) pcs.name = "NoName"; pcs.state = RS_PEER_S_FRIEND; pcs.actions = RS_PEER_NEW; + pcs.linkType = RS_NET_CONN_SPEED_UNKNOWN ; mFriendList[id] = pcs; diff --git a/libretroshare/src/pqi/pqinetstatebox.cc b/libretroshare/src/pqi/pqinetstatebox.cc index 9bd1ba901..0fcad3da6 100644 --- a/libretroshare/src/pqi/pqinetstatebox.cc +++ b/libretroshare/src/pqi/pqinetstatebox.cc @@ -190,24 +190,34 @@ void pqiNetStateBox::reset() mStunDhtSet = false; mStunDhtTS = 0; mStunDhtStable = false; + mStunDhtAddr.sin_addr.s_addr = 0 ; + mStunDhtAddr.sin_port = 0 ; //struct sockaddr_in mStunDhtAddr; mStunProxySet = false; mStunProxySemiStable = false; mStunProxyTS = 0; mStunProxyStable = false; + mStunProxyAddr.sin_addr.s_addr = 0 ; + mStunProxyAddr.sin_port = 0 ; //struct sockaddr_in mStunProxyAddr; mUPnPSet = false; mUPnPActive = false; + mUPnPAddr.sin_addr.s_addr = 0 ; + mUPnPAddr.sin_port = 0 ; //struct sockaddr_in mUPnPAddr; mNatPMPSet = false; mNatPMPActive = false; + mNatPMPAddr.sin_addr.s_addr = 0 ; + mNatPMPAddr.sin_port = 0 ; //struct sockaddr_in mNatPMPAddr; mWebIPSet = false; mWebIPActive = false; + mWebIPAddr.sin_addr.s_addr = 0 ; + mWebIPAddr.sin_port = 0 ; //struct sockaddr_in mWebIPAddr; mPortForwardSet = false; diff --git a/libretroshare/src/services/p3chatservice.cc b/libretroshare/src/services/p3chatservice.cc index 3f650e09e..964b1d984 100644 --- a/libretroshare/src/services/p3chatservice.cc +++ b/libretroshare/src/services/p3chatservice.cc @@ -39,6 +39,7 @@ /**** * #define CHAT_DEBUG 1 ****/ +#define CHAT_DEBUG 1 static const int CONNECTION_CHALLENGE_MAX_COUNT = 20 ; // sends a connexion challenge every 20 messages static const int CONNECTION_CHALLENGE_MIN_DELAY = 15 ; // sends a connexion at most every 15 seconds