From f8f4e1fc32000c7dd4bed6a55a0794512f9ff3ca Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sat, 15 Dec 2007 03:17:50 +0000 Subject: [PATCH] more helpful error message --- libtransmission/net.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libtransmission/net.c b/libtransmission/net.c index 5f61362de..06aee41ad 100644 --- a/libtransmission/net.c +++ b/libtransmission/net.c @@ -131,9 +131,11 @@ tr_netOpen( const struct in_addr * addr, tr_port_t port, #endif && ( sockerrno != EINPROGRESS ) ) { - tr_err( "Couldn't connect socket (%s)", strerror( sockerrno ) ); + tr_err( "Couldn't connect socket %d to %s, port %d (errno %d - %s)", + s, inet_ntoa(*addr), port, + sockerrno, strerror(sockerrno) ); tr_netClose( s ); - return -1; + s = -1; } return s;