From 2147284cad624325f5b0034c2f394db62086d9e6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 2 Nov 2006 21:56:40 +0000 Subject: James Housley brought support for SCP transfers --- lib/version.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'lib/version.c') diff --git a/lib/version.c b/lib/version.c index 722f93b22..c778896b2 100644 --- a/lib/version.c +++ b/lib/version.c @@ -45,6 +45,11 @@ #include #endif +#ifdef USE_LIBSSH2 +#include +#endif + + char *curl_version(void) { static char version[200]; @@ -88,6 +93,11 @@ char *curl_version(void) left -= len; ptr += len; #endif +#ifdef USE_LIBSSH2 + len = snprintf(ptr, left, " libssh2/%s", LIBSSH2_VERSION); + left -= len; + ptr += len; +#endif return version; } @@ -125,6 +135,11 @@ static const char * const protocols[] = { "ftps", #endif #endif + +#ifdef USE_LIBSSH2 + "scp", +#endif + NULL }; @@ -179,10 +194,15 @@ static curl_version_info_data version_info = { 0, /* c-ares version numerical */ NULL, /* libidn version */ 0, /* iconv version */ + NULL, /* ssh lib version */ }; curl_version_info_data *curl_version_info(CURLversion stamp) { +#ifdef USE_LIBSSH2 + static char ssh_buffer[80]; +#endif + #ifdef USE_SSL static char ssl_buffer[80]; Curl_ssl_version(ssl_buffer, sizeof(ssl_buffer)); @@ -217,6 +237,11 @@ curl_version_info_data *curl_version_info(CURLversion stamp) #endif /* _LIBICONV_VERSION */ #endif +#ifdef USE_LIBSSH2 + snprintf(ssh_buffer, sizeof(ssh_buffer), "libssh2/%s", LIBSSH2_VERSION); + version_info.libssh_version = ssh_buffer; +#endif + (void)stamp; /* avoid compiler warnings, we don't use this */ return &version_info; -- cgit v1.2.3