mirror of
https://github.com/transmission/transmission
synced 2025-03-19 18:25:38 +00:00
(trunk libT) tr_udpParse(): default to port 80 for URLs with a udp scheme and no explicit port.
This commit is contained in:
parent
f4b4ddd231
commit
6ae220dee0
1 changed files with 5 additions and 4 deletions
|
@ -1106,10 +1106,11 @@ tr_urlParse( const char * url_in,
|
|||
|
||||
if( !err && !port )
|
||||
{
|
||||
if( !strcmp( protocol, "ftp" ) ) port = 21;
|
||||
if( !strcmp( protocol, "sftp" ) ) port = 22;
|
||||
if( !strcmp( protocol, "http" ) ) port = 80;
|
||||
if( !strcmp( protocol, "https" ) ) port = 443;
|
||||
if( !strcmp( protocol, "udp" ) ) port = 80;
|
||||
else if( !strcmp( protocol, "ftp" ) ) port = 21;
|
||||
else if( !strcmp( protocol, "sftp" ) ) port = 22;
|
||||
else if( !strcmp( protocol, "http" ) ) port = 80;
|
||||
else if( !strcmp( protocol, "https" ) ) port = 443;
|
||||
}
|
||||
|
||||
if( !err )
|
||||
|
|
Loading…
Add table
Reference in a new issue