1
0
Fork 0
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:
Jordan Lee 2011-03-17 21:22:58 +00:00
parent f4b4ddd231
commit 6ae220dee0

View file

@ -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 )