1
0
Fork 0
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:
Charles Kerr 2008-12-10 06:12:04 +00:00
parent 6e66d09fbf
commit 9f1709352b

View file

@ -152,18 +152,20 @@ tr_upnpPulse( tr_upnp * handle,
if( handle->state == TR_UPNP_MAP ) if( handle->state == TR_UPNP_MAP )
{ {
int err = -1; int err = -1;
char portStr[16];
tr_snprintf( portStr, sizeof( portStr ), "%d", port );
errno = 0; errno = 0;
if( !handle->urls.controlURL || !handle->data.servicetype ) if( !handle->urls.controlURL || !handle->data.servicetype )
handle->isMapped = 0; handle->isMapped = 0;
else 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, err = UPNP_AddPortMapping( handle->urls.controlURL,
handle->data.servicetype, handle->data.servicetype,
portStr, portStr, handle->lanaddr, portStr, portStr, handle->lanaddr,
"Transmission", "TCP" ); desc, "TCP" );
handle->isMapped = !err; handle->isMapped = !err;
} }
tr_ninf( getKey( ), tr_ninf( getKey( ),