mirror of
https://github.com/transmission/transmission
synced 2024-12-25 17:17:31 +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 )
|
tr_peerIoAddrStr( const struct in_addr * addr, uint16_t port )
|
||||||
{
|
{
|
||||||
static char buf[512];
|
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;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -254,7 +254,8 @@ publishNewPeers( tr_tracker * t, int count, uint8_t * peers )
|
||||||
event.peerCount = count;
|
event.peerCount = count;
|
||||||
event.peerCompact = peers;
|
event.peerCompact = peers;
|
||||||
tr_inf( "Torrent \"%s\" got %d new peers", t->name, count );
|
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