aboutsummaryrefslogtreecommitdiff
path: root/lib/version.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-11-02 21:56:40 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-11-02 21:56:40 +0000
commit2147284cad624325f5b0034c2f394db62086d9e6 (patch)
tree4a874303150609f63388ada95e308f79c023519d /lib/version.c
parent7f1870da5f5fa114c461bc8d4651961ad0d370f0 (diff)
James Housley brought support for SCP transfers
Diffstat (limited to 'lib/version.c')
-rw-r--r--lib/version.c25
1 files changed, 25 insertions, 0 deletions
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 <iconv.h>
#endif
+#ifdef USE_LIBSSH2
+#include <libssh2.h>
+#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;