diff options
author | Steve Holme <steve_holme@hotmail.com> | 2012-06-10 12:07:45 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2012-06-11 19:00:36 +0200 |
commit | bd38ebc6975f5de2ed6ac33ade46e92356d77966 (patch) | |
tree | 0f63f23566da30a048166e00c2d7919d84f1bee7 /lib/curl_schannel.c | |
parent | b15434e74924b9155dd116e647bed507cccd0cf1 (diff) | |
download | curl-bd38ebc6975f5de2ed6ac33ade46e92356d77966.tar.gz |
sspi: Reworked Curl_sspi_version() to return version components
Reworked the version function to return four version components rather
than a string that has to be freed by the caller.
Diffstat (limited to 'lib/curl_schannel.c')
-rw-r--r-- | lib/curl_schannel.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/curl_schannel.c b/lib/curl_schannel.c index 7bca90340..511f675e4 100644 --- a/lib/curl_schannel.c +++ b/lib/curl_schannel.c @@ -974,9 +974,14 @@ void Curl_schannel_cleanup() size_t Curl_schannel_version(char *buffer, size_t size) { - char *version = Curl_sspi_version(); - size = snprintf(buffer, size, "Schannel/%s", version); - free(version); + int sspi_major = 0, sspi_minor = 0, sspi_build = 0; + + if(!Curl_sspi_version(&sspi_major, &sspi_minor, &sspi_build, NULL)) + size = snprintf(buffer, size, "WinSSPI/%d.%d.%d", sspi_major, sspi_minor, + sspi_build); + else + size = snprintf(buffer, size, "WinSSPI/unknown"); + return size; } |