mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +00:00
(trunk libT) strip trailing whitespace
This commit is contained in:
parent
6c845ba5f4
commit
1101ba8d57
3 changed files with 7 additions and 9 deletions
|
@ -52,7 +52,7 @@ tau_sendto( tr_session * session,
|
||||||
const void * buf, size_t buflen )
|
const void * buf, size_t buflen )
|
||||||
{
|
{
|
||||||
int sockfd;
|
int sockfd;
|
||||||
|
|
||||||
if( ai->ai_addr->sa_family == AF_INET )
|
if( ai->ai_addr->sa_family == AF_INET )
|
||||||
sockfd = session->udp_socket;
|
sockfd = session->udp_socket;
|
||||||
else if( ai->ai_addr->sa_family == AF_INET6 )
|
else if( ai->ai_addr->sa_family == AF_INET6 )
|
||||||
|
@ -487,7 +487,7 @@ tau_tracker_on_dns( int errcode, struct evutil_addrinfo *addr, void * vtracker )
|
||||||
|
|
||||||
if ( errcode )
|
if ( errcode )
|
||||||
{
|
{
|
||||||
char * errmsg = tr_strdup_printf( _( "DNS Lookup failed: %s" ),
|
char * errmsg = tr_strdup_printf( _( "DNS Lookup failed: %s" ),
|
||||||
evdns_err_to_string( errcode ) );
|
evdns_err_to_string( errcode ) );
|
||||||
dbgmsg( tracker->key, "%s", errmsg );
|
dbgmsg( tracker->key, "%s", errmsg );
|
||||||
tau_tracker_fail_all( tracker, false, false, errmsg );
|
tau_tracker_fail_all( tracker, false, false, errmsg );
|
||||||
|
@ -652,7 +652,7 @@ tau_tracker_upkeep( struct tau_tracker * tracker )
|
||||||
|
|
||||||
/* if the address info is too old, expire it */
|
/* if the address info is too old, expire it */
|
||||||
if( tracker->addr && ( tracker->addr_expiration_time <= now ) ) {
|
if( tracker->addr && ( tracker->addr_expiration_time <= now ) ) {
|
||||||
dbgmsg( tracker->host, "Expiring old DNS result" );
|
dbgmsg( tracker->host, "Expiring old DNS result" );
|
||||||
evutil_freeaddrinfo( tracker->addr );
|
evutil_freeaddrinfo( tracker->addr );
|
||||||
tracker->addr = NULL;
|
tracker->addr = NULL;
|
||||||
}
|
}
|
||||||
|
@ -671,7 +671,7 @@ tau_tracker_upkeep( struct tau_tracker * tracker )
|
||||||
hints.ai_socktype = SOCK_DGRAM;
|
hints.ai_socktype = SOCK_DGRAM;
|
||||||
hints.ai_protocol = IPPROTO_UDP;
|
hints.ai_protocol = IPPROTO_UDP;
|
||||||
tracker->is_asking_dns = true;
|
tracker->is_asking_dns = true;
|
||||||
dbgmsg( tracker->host, "Trying a new DNS lookup" );
|
dbgmsg( tracker->host, "Trying a new DNS lookup" );
|
||||||
evdns_getaddrinfo( tracker->session->evdns_base,
|
evdns_getaddrinfo( tracker->session->evdns_base,
|
||||||
tracker->host, NULL, &hints,
|
tracker->host, NULL, &hints,
|
||||||
tau_tracker_on_dns, tracker );
|
tau_tracker_on_dns, tracker );
|
||||||
|
@ -824,7 +824,6 @@ tr_tracker_udp_close( tr_session * session )
|
||||||
tr_ptrArrayDestruct( &tau->trackers, (PtrArrayForeachFunc)tau_tracker_free );
|
tr_ptrArrayDestruct( &tau->trackers, (PtrArrayForeachFunc)tau_tracker_free );
|
||||||
tr_free( tau );
|
tr_free( tau );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* start shutting down.
|
/* start shutting down.
|
||||||
|
|
|
@ -994,7 +994,6 @@ static void
|
||||||
on_announce_done( const tr_announce_response * response,
|
on_announce_done( const tr_announce_response * response,
|
||||||
void * vdata )
|
void * vdata )
|
||||||
{
|
{
|
||||||
|
|
||||||
struct announce_data * data = vdata;
|
struct announce_data * data = vdata;
|
||||||
tr_announcer * announcer = data->session->announcer;
|
tr_announcer * announcer = data->session->announcer;
|
||||||
tr_tier * tier = getTier( announcer, response->info_hash, data->tierId );
|
tr_tier * tier = getTier( announcer, response->info_hash, data->tierId );
|
||||||
|
@ -1496,7 +1495,7 @@ onUpkeepTimer( int foo UNUSED, short bar UNUSED, void * vannouncer )
|
||||||
flushCloseMessages( announcer );
|
flushCloseMessages( announcer );
|
||||||
|
|
||||||
/* maybe send out some announcements to trackers */
|
/* maybe send out some announcements to trackers */
|
||||||
if( !is_closing )
|
if( !is_closing )
|
||||||
announceMore( announcer );
|
announceMore( announcer );
|
||||||
|
|
||||||
/* TAU upkeep */
|
/* TAU upkeep */
|
||||||
|
|
|
@ -1608,7 +1608,7 @@ tr_htonll( uint64_t x )
|
||||||
#else
|
#else
|
||||||
/* fallback code by Runner and Juan Carlos Cobas at
|
/* fallback code by Runner and Juan Carlos Cobas at
|
||||||
* http://www.codeproject.com/KB/cpp/endianness.aspx */
|
* http://www.codeproject.com/KB/cpp/endianness.aspx */
|
||||||
return (((uint64_t)(htonl((int)((x << 32) >> 32))) << 32) |
|
return (((uint64_t)(htonl((int)((x << 32) >> 32))) << 32) |
|
||||||
(unsigned int)htonl(((int)(x >> 32))));
|
(unsigned int)htonl(((int)(x >> 32))));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -1621,7 +1621,7 @@ tr_ntohll( uint64_t x )
|
||||||
#else
|
#else
|
||||||
/* fallback code by Runner and Juan Carlos Cobas at
|
/* fallback code by Runner and Juan Carlos Cobas at
|
||||||
* http://www.codeproject.com/KB/cpp/endianness.aspx */
|
* http://www.codeproject.com/KB/cpp/endianness.aspx */
|
||||||
return (((uint64_t)(ntohl((int)((x << 32) >> 32))) << 32) |
|
return (((uint64_t)(ntohl((int)((x << 32) >> 32))) << 32) |
|
||||||
(unsigned int)ntohl(((int)(x >> 32))));
|
(unsigned int)ntohl(((int)(x >> 32))));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue