mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
(trunk libT) add SO_SNDBUF, SO_RCVBUF logging messages
This commit is contained in:
parent
66880acfc7
commit
da7ab27ae2
1 changed files with 16 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue