diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-10-03 17:59:39 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-10-03 17:59:39 +0900 |
| commit | c81b1321122e8509b55c94c0cbca0d8d6d319f0c (patch) | |
| tree | f24b49dd9cceb006172dbd09da4e5f5d3371241b /src/FeatureConfig.cc | |
| parent | c63fc414c389c893c80022669a7d75f3c6869c7e (diff) | |
| parent | 85faafcaf233855042aead1cc522375fa7955d7e (diff) | |
Merge branch 'master' into random-webseeding
Diffstat (limited to 'src/FeatureConfig.cc')
| -rw-r--r-- | src/FeatureConfig.cc | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/FeatureConfig.cc b/src/FeatureConfig.cc index 1d2d30bb..1b5b183a 100644 --- a/src/FeatureConfig.cc +++ b/src/FeatureConfig.cc @@ -67,7 +67,9 @@ #ifdef HAVE_SYS_UTSNAME_H # include <sys/utsname.h> #endif // HAVE_SYS_UTSNAME_H - +#ifdef HAVE_LIBSSH2 +# include <libssh2.h> +#endif // HAVE_LIBSSH2 #include "util.h" namespace aria2 { @@ -80,6 +82,8 @@ uint16_t getDefaultPort(const std::string& protocol) return 443; } else if(protocol == "ftp") { return 21; + } else if(protocol == "sftp") { + return 22; } else { return 0; } @@ -166,6 +170,14 @@ const char* strSupportedFeature(int feature) #endif // !ENABLE_XML_RPC break; + case(FEATURE_SFTP): +#ifdef HAVE_LIBSSH2 + return "SFTP"; +#else // !HAVE_LIBSSH2 + return nullptr; +#endif // !HAVE_LIBSSH2 + break; + default: return nullptr; } @@ -221,6 +233,11 @@ std::string usedLibs() #ifdef HAVE_LIBCARES res += "c-ares/" ARES_VERSION_STR " "; #endif // HAVE_LIBCARES + +#ifdef HAVE_LIBSSH2 + res += "libssh2/" LIBSSH2_VERSION " "; +#endif // HAVE_LIBSSH2 + if(!res.empty()) { res.erase(res.length()-1); } |
