Merge branch 'patch' of ssh://github.com/svost/novacoin into svost-patch
[novacoin.git] / src / ntp.cpp
index 527a02c..64fd46c 100644 (file)
@@ -411,7 +411,7 @@ int64_t NtpGetTime(CNetAddr& ip) {
     ip = CNetAddr(((sockaddr_in *)&cliaddr)->sin_addr);
     int64_t nTime = DoReq(sockfd, servlen, cliaddr);
 
-    closesocket(sockfd);
+    CloseSocket(sockfd);
 
     return nTime;
 }
@@ -428,7 +428,7 @@ int64_t NtpGetTime(const std::string &strHostName)
 
     int64_t nTime = DoReq(sockfd, servlen, cliaddr);
 
-    closesocket(sockfd);
+    CloseSocket(sockfd);
 
     return nTime;
 }
@@ -445,7 +445,7 @@ int64_t GetNtpOffset() {
 }
 
 void ThreadNtpSamples(void* parg) {
-    const int64_t nMaxOffset = 86400; // Not a real limit, just sanity threshold.
+    const int64_t nMaxOffset = nOneDay; // Not a real limit, just sanity threshold.
 
     printf("Trying to find NTP server at localhost...\n");