From 6ae220dee0311d43d5cc57779fd5b396f412011c Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Thu, 17 Mar 2011 21:22:58 +0000 Subject: [PATCH] (trunk libT) tr_udpParse(): default to port 80 for URLs with a udp scheme and no explicit port. --- libtransmission/utils.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libtransmission/utils.c b/libtransmission/utils.c index fb250b438..fe2bc9865 100644 --- a/libtransmission/utils.c +++ b/libtransmission/utils.c @@ -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 ) -- 2.40.0