Remove msvc C4245 warning, better readability.
[novacoin.git] / src / net.h
index 56a3391..7306d13 100644 (file)
--- a/src/net.h
+++ b/src/net.h
@@ -39,6 +39,7 @@ void AddressCurrentlyConnected(const CService& addr);
 CNode* FindNode(const CNetAddr& ip);
 CNode* FindNode(const CService& ip);
 CNode* ConnectNode(CAddress addrConnect, const char *strDest = NULL, int64_t nTimeout=0);
+bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false);
 void MapPort();
 unsigned short GetListenPort();
 bool BindListenPort(const CService &bindAddr, std::string& strError=REF(std::string()));
@@ -232,7 +233,7 @@ public:
         nLastSendEmpty = GetTime();
         nTimeConnected = GetTime();
         nHeaderStart = -1;
-        nMessageStart = -1;
+        nMessageStart = UINT_MAX;
         addr = addrIn;
         addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn;
         nVersion = 0;
@@ -374,7 +375,7 @@ public:
             return;
         vSend.resize(nHeaderStart);
         nHeaderStart = -1;
-        nMessageStart = -1;
+        nMessageStart = UINT_MAX;
         LEAVE_CRITICAL_SECTION(cs_vSend);
 
         if (fDebug)
@@ -409,7 +410,7 @@ public:
         }
 
         nHeaderStart = -1;
-        nMessageStart = -1;
+        nMessageStart = UINT_MAX;
         LEAVE_CRITICAL_SECTION(cs_vSend);
     }