1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 01:57:52 +00:00

(trunk libT) fix minor bug in r9651 "Reduce SO_SNDBUF and SO_RCVBUF for tracker announce/scrape messages" -- libcurl's CURLOPT_SOCKOPTFUNCTION doesn't return void; it returns an int that is nonzero if an error occurs.

This commit is contained in:
Charles Kerr 2009-12-28 23:25:50 +00:00
parent 196666da72
commit ee58472ec2

View file

@ -107,7 +107,7 @@ writeFunc( void * ptr, size_t size, size_t nmemb, void * vtask )
return byteCount; return byteCount;
} }
static void static int
sockoptfunction( void * vtask, curl_socket_t fd, curlsocktype purpose UNUSED ) sockoptfunction( void * vtask, curl_socket_t fd, curlsocktype purpose UNUSED )
{ {
struct tr_web_task * task = vtask; struct tr_web_task * task = vtask;
@ -123,6 +123,9 @@ sockoptfunction( void * vtask, curl_socket_t fd, curlsocktype purpose UNUSED )
setsockopt( fd, SOL_SOCKET, SO_SNDBUF, &sndbuf, sizeof(sndbuf) ); setsockopt( fd, SOL_SOCKET, SO_SNDBUF, &sndbuf, sizeof(sndbuf) );
setsockopt( fd, SOL_SOCKET, SO_RCVBUF, &rcvbuf, sizeof(rcvbuf) ); setsockopt( fd, SOL_SOCKET, SO_RCVBUF, &rcvbuf, sizeof(rcvbuf) );
} }
/* return nonzero if this function encountered an error */
return 0;
} }
static int static int