mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
fix byte ordering of the port in tr_peerIoAddrStr()
This commit is contained in:
parent
88053029bb
commit
6c6228770c
2 changed files with 3 additions and 2 deletions
|
@ -242,7 +242,7 @@ const char*
|
|||
tr_peerIoAddrStr( const struct in_addr * addr, uint16_t port )
|
||||
{
|
||||
static char buf[512];
|
||||
snprintf( buf, sizeof(buf), "%s:%u", inet_ntoa( *addr ), (unsigned int)port );
|
||||
snprintf( buf, sizeof(buf), "%s:%u", inet_ntoa( *addr ), ntohs( port ) );
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
|
|
@ -254,7 +254,8 @@ publishNewPeers( tr_tracker * t, int count, uint8_t * peers )
|
|||
event.peerCount = count;
|
||||
event.peerCompact = peers;
|
||||
tr_inf( "Torrent \"%s\" got %d new peers", t->name, count );
|
||||
tr_publisherPublish( t->publisher, t, &event );
|
||||
if( count )
|
||||
tr_publisherPublish( t->publisher, t, &event );
|
||||
}
|
||||
|
||||
/***
|
||||
|
|
Loading…
Reference in a new issue