diff --git a/libtransmission/upnp.c b/libtransmission/upnp.c index 3acce1130..c4b536336 100644 --- a/libtransmission/upnp.c +++ b/libtransmission/upnp.c @@ -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( ),