1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

(trunk libT) strip trailing whitespace

This commit is contained in:
Jordan Lee 2011-03-28 13:37:46 +00:00
parent 6c845ba5f4
commit 1101ba8d57
3 changed files with 7 additions and 9 deletions

View file

@ -52,7 +52,7 @@ tau_sendto( tr_session * session,
const void * buf, size_t buflen )
{
int sockfd;
if( ai->ai_addr->sa_family == AF_INET )
sockfd = session->udp_socket;
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 )
{
char * errmsg = tr_strdup_printf( _( "DNS Lookup failed: %s" ),
char * errmsg = tr_strdup_printf( _( "DNS Lookup failed: %s" ),
evdns_err_to_string( errcode ) );
dbgmsg( tracker->key, "%s", 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( 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 );
tracker->addr = NULL;
}
@ -671,7 +671,7 @@ tau_tracker_upkeep( struct tau_tracker * tracker )
hints.ai_socktype = SOCK_DGRAM;
hints.ai_protocol = IPPROTO_UDP;
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,
tracker->host, NULL, &hints,
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_free( tau );
}
}
/* start shutting down.

View file

@ -994,7 +994,6 @@ static void
on_announce_done( const tr_announce_response * response,
void * vdata )
{
struct announce_data * data = vdata;
tr_announcer * announcer = data->session->announcer;
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 );
/* maybe send out some announcements to trackers */
if( !is_closing )
if( !is_closing )
announceMore( announcer );
/* TAU upkeep */

View file

@ -1608,7 +1608,7 @@ tr_htonll( uint64_t x )
#else
/* fallback code by Runner and Juan Carlos Cobas at
* 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))));
#endif
}
@ -1621,7 +1621,7 @@ tr_ntohll( uint64_t x )
#else
/* fallback code by Runner and Juan Carlos Cobas at
* 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))));
#endif
}