aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@exmulti.com>2011-07-02 12:04:09 -0700
committerJeff Garzik <jgarzik@exmulti.com>2011-07-02 12:04:09 -0700
commit1a19fc17b27e72991265a7a28c4f818d36820e43 (patch)
tree4ab77694e4cdc81b7f9ffba398af088e041d2f0c /src
parent9cd1dfe8987e6732e602a5f474b21aedf453c636 (diff)
parent013df1cc3b1f441b9e4361fdf5574d0b2af1812b (diff)
Merge pull request #374 from TheBlueMatt/neterror
Give more detailed error messages for connection failure.
Diffstat (limited to 'src')
-rw-r--r--src/net.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp
index e8422a5376..23b40f975d 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -9,6 +9,10 @@
#include "init.h"
#include "strlcpy.h"
+#ifdef __WXMSW__
+#include <string.h>
+#endif
+
#ifdef USE_UPNP
#include <miniupnpc/miniwget.h>
#include <miniupnpc/miniupnpc.h>
@@ -148,7 +152,7 @@ bool ConnectSocket(const CAddress& addrConnect, SOCKET& hSocketRet, int nTimeout
}
if (nRet != 0)
{
- printf("connect() failed after select(): %i\n",nRet);
+ printf("connect() failed after select(): %s\n",strerror(nRet));
closesocket(hSocket);
return false;
}