From da7ab27ae2c023dabfbc0e463c66653e5bbf0485 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 29 Nov 2009 08:53:14 +0000 Subject: [PATCH] (trunk libT) add SO_SNDBUF, SO_RCVBUF logging messages --- libtransmission/fdlimit.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/libtransmission/fdlimit.c b/libtransmission/fdlimit.c index 6550a2c2b..06ca0011c 100644 --- a/libtransmission/fdlimit.c +++ b/libtransmission/fdlimit.c @@ -652,6 +652,22 @@ tr_fdSocketCreate( tr_session * session, int domain, int type ) ++gFd->socketCount; assert( gFd->socketCount >= 0 ); + + if( s >= 0 ) + { + static tr_bool buf_logged = FALSE; + if( !buf_logged ) + { + int i; + socklen_t size = sizeof( int ); + buf_logged = TRUE; + getsockopt( s, SOL_SOCKET, SO_SNDBUF, &i, &size ); + tr_inf( "SO_SNDBUF size is %d", i ); + getsockopt( s, SOL_SOCKET, SO_RCVBUF, &i, &size ); + tr_inf( "SO_RCVBUF size is %d", i ); + } + } + return s; }