fixed uninitialized values

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4848 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-01-26 20:03:54 +00:00
parent 522729bae4
commit 5a5c0264d0
3 changed files with 12 additions and 0 deletions

View File

@ -2144,6 +2144,7 @@ int p3LinkMgrIMPL::addFriend(const std::string &id, bool isVisible)
pcs.name = "NoName"; pcs.name = "NoName";
pcs.state = RS_PEER_S_FRIEND; pcs.state = RS_PEER_S_FRIEND;
pcs.actions = RS_PEER_NEW; pcs.actions = RS_PEER_NEW;
pcs.linkType = RS_NET_CONN_SPEED_UNKNOWN ;
mFriendList[id] = pcs; mFriendList[id] = pcs;

View File

@ -190,24 +190,34 @@ void pqiNetStateBox::reset()
mStunDhtSet = false; mStunDhtSet = false;
mStunDhtTS = 0; mStunDhtTS = 0;
mStunDhtStable = false; mStunDhtStable = false;
mStunDhtAddr.sin_addr.s_addr = 0 ;
mStunDhtAddr.sin_port = 0 ;
//struct sockaddr_in mStunDhtAddr; //struct sockaddr_in mStunDhtAddr;
mStunProxySet = false; mStunProxySet = false;
mStunProxySemiStable = false; mStunProxySemiStable = false;
mStunProxyTS = 0; mStunProxyTS = 0;
mStunProxyStable = false; mStunProxyStable = false;
mStunProxyAddr.sin_addr.s_addr = 0 ;
mStunProxyAddr.sin_port = 0 ;
//struct sockaddr_in mStunProxyAddr; //struct sockaddr_in mStunProxyAddr;
mUPnPSet = false; mUPnPSet = false;
mUPnPActive = false; mUPnPActive = false;
mUPnPAddr.sin_addr.s_addr = 0 ;
mUPnPAddr.sin_port = 0 ;
//struct sockaddr_in mUPnPAddr; //struct sockaddr_in mUPnPAddr;
mNatPMPSet = false; mNatPMPSet = false;
mNatPMPActive = false; mNatPMPActive = false;
mNatPMPAddr.sin_addr.s_addr = 0 ;
mNatPMPAddr.sin_port = 0 ;
//struct sockaddr_in mNatPMPAddr; //struct sockaddr_in mNatPMPAddr;
mWebIPSet = false; mWebIPSet = false;
mWebIPActive = false; mWebIPActive = false;
mWebIPAddr.sin_addr.s_addr = 0 ;
mWebIPAddr.sin_port = 0 ;
//struct sockaddr_in mWebIPAddr; //struct sockaddr_in mWebIPAddr;
mPortForwardSet = false; mPortForwardSet = false;

View File

@ -39,6 +39,7 @@
/**** /****
* #define CHAT_DEBUG 1 * #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_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 static const int CONNECTION_CHALLENGE_MIN_DELAY = 15 ; // sends a connexion at most every 15 seconds