mirror of
https://github.com/transmission/transmission
synced 2025-02-22 22:20:39 +00:00
(trunk libT) #3249 "C99-ism in libtransmission/tr-lpd.c" -- fixed in trunk for 2.00
This commit is contained in:
parent
6963f3dc93
commit
59560eccf6
1 changed files with 3 additions and 2 deletions
|
@ -32,7 +32,7 @@ THE SOFTWARE.
|
||||||
#include <sys/socket.h> /* socket(), bind() */
|
#include <sys/socket.h> /* socket(), bind() */
|
||||||
#include <unistd.h> /* close() */
|
#include <unistd.h> /* close() */
|
||||||
#include <fcntl.h> /* fcntl(), O_NONBLOCK */
|
#include <fcntl.h> /* fcntl(), O_NONBLOCK */
|
||||||
#include <ctype.h>
|
#include <ctype.h> /* toupper() */
|
||||||
|
|
||||||
/* third party */
|
/* third party */
|
||||||
#include <event.h>
|
#include <event.h>
|
||||||
|
@ -429,6 +429,7 @@ static inline void lpd_consistencyCheck( void )
|
||||||
*/
|
*/
|
||||||
tr_bool tr_lpdSendAnnounce( const tr_torrent* t )
|
tr_bool tr_lpdSendAnnounce( const tr_torrent* t )
|
||||||
{
|
{
|
||||||
|
size_t i;
|
||||||
const char fmt[] =
|
const char fmt[] =
|
||||||
"BT-SEARCH * HTTP/%u.%u" CRLF
|
"BT-SEARCH * HTTP/%u.%u" CRLF
|
||||||
"Host: %s:%u" CRLF
|
"Host: %s:%u" CRLF
|
||||||
|
@ -444,7 +445,7 @@ tr_bool tr_lpdSendAnnounce( const tr_torrent* t )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* make sure the hash string is normalized, just in case */
|
/* make sure the hash string is normalized, just in case */
|
||||||
for( size_t i = 0; i < sizeof hashString; i++ )
|
for( i = 0; i < sizeof hashString; i++ )
|
||||||
hashString[i] = toupper( t->info.hashString[i] );
|
hashString[i] = toupper( t->info.hashString[i] );
|
||||||
|
|
||||||
/* prepare a zero-terminated announce message */
|
/* prepare a zero-terminated announce message */
|
||||||
|
|
Loading…
Reference in a new issue