mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +00:00
(trunk libT) make the upnp description a little easier to differentiate between separate instances of Transmission
This commit is contained in:
parent
6e66d09fbf
commit
9f1709352b
1 changed files with 5 additions and 3 deletions
|
@ -152,18 +152,20 @@ tr_upnpPulse( tr_upnp * handle,
|
|||
if( handle->state == TR_UPNP_MAP )
|
||||
{
|
||||
int err = -1;
|
||||
char portStr[16];
|
||||
tr_snprintf( portStr, sizeof( portStr ), "%d", port );
|
||||
errno = 0;
|
||||
|
||||
if( !handle->urls.controlURL || !handle->data.servicetype )
|
||||
handle->isMapped = 0;
|
||||
else
|
||||
{
|
||||
char portStr[16];
|
||||
char desc[64];
|
||||
tr_snprintf( portStr, sizeof( portStr ), "%d", port );
|
||||
tr_snprintf( desc, sizeof( desc ), "%s at %d", TR_NAME, port );
|
||||
err = UPNP_AddPortMapping( handle->urls.controlURL,
|
||||
handle->data.servicetype,
|
||||
portStr, portStr, handle->lanaddr,
|
||||
"Transmission", "TCP" );
|
||||
desc, "TCP" );
|
||||
handle->isMapped = !err;
|
||||
}
|
||||
tr_ninf( getKey( ),
|
||||
|
|
Loading…
Reference in a new issue