aboutsummaryrefslogtreecommitdiff
path: root/libsylph
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2014-06-11 09:51:15 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2014-06-11 09:51:15 +0000
commit7bdd030748133e93c99d55f3c7763526c85d666d (patch)
tree57e55083788b6b0389ce859cbe3727734c02723f /libsylph
parentc78c4cbc71476468ccaaa64ee9d4b280b7bcd612 (diff)
win32: fixed crash on network failure.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3418 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph')
-rw-r--r--libsylph/socket.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libsylph/socket.c b/libsylph/socket.c
index 18ffbe48..1d9c648f 100644
--- a/libsylph/socket.c
+++ b/libsylph/socket.c
@@ -1090,8 +1090,14 @@ static SockDesc sock_info_connect_by_getaddrinfo(SockInfo *sockinfo)
g_snprintf(port_str, sizeof(port_str), "%d", sockinfo->port);
if ((gai_error = getaddrinfo(sockinfo->hostname, port_str, &hints, &res)) != 0) {
+#ifdef G_OS_WIN32
+ fprintf(stderr, "getaddrinfo for %s:%s failed: errno: %d\n",
+ sockinfo->hostname, port_str, gai_error);
+#else
fprintf(stderr, "getaddrinfo for %s:%s failed: %s\n",
sockinfo->hostname, port_str, gai_strerror(gai_error));
+#endif
+ debug_print("getaddrinfo failed\n");
sockinfo->state = CONN_LOOKUPFAILED;
return INVALID_SOCKET;
}