diff options
author | Yang Tse <yangsita@gmail.com> | 2012-06-12 01:06:48 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2012-06-12 01:06:48 +0200 |
commit | 764a5e4a50286c27b0fa0c16bc44659880a184a5 (patch) | |
tree | 3b2fc6f97e263ef4bd2660f6160f53c8f476a8f3 /lib/socks_sspi.c | |
parent | af0888aaf6b444388d9b2770e310e9ef48354515 (diff) | |
download | curl-764a5e4a50286c27b0fa0c16bc44659880a184a5.tar.gz |
sspi: make Curl_sspi_strerror() libcurl's sspi status code string function
Diffstat (limited to 'lib/socks_sspi.c')
-rw-r--r-- | lib/socks_sspi.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/socks_sspi.c b/lib/socks_sspi.c index 1e724bb06..c0a289786 100644 --- a/lib/socks_sspi.c +++ b/lib/socks_sspi.c @@ -6,6 +6,7 @@ * \___|\___/|_| \_\_____| * * Copyright (C) 2009, 2011, Markus Moeller, <markus_moeller@compuserve.com> + * Copyright (C) 2012, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -27,6 +28,7 @@ #include "urldata.h" #include "sendf.h" #include "connect.h" +#include "strerror.h" #include "timeval.h" #include "socks.h" #include "curl_sspi.h" @@ -48,21 +50,19 @@ /* * Helper sspi error functions. */ -static int check_sspi_err(struct SessionHandle *data, +static int check_sspi_err(struct connectdata *conn, SECURITY_STATUS major_status, SECURITY_STATUS minor_status, const char* function) { - char *sspi_msg = NULL; (void)minor_status; if(major_status != SEC_E_OK && major_status != SEC_I_COMPLETE_AND_CONTINUE && major_status != SEC_I_COMPLETE_NEEDED && major_status != SEC_I_CONTINUE_NEEDED) { - sspi_msg = Curl_sspi_status_msg(major_status); - failf(data, "SSPI error: %s failed: %s\n", function, sspi_msg); - free(sspi_msg); + failf(conn->data, "SSPI error: %s failed: %s\n", function, + Curl_sspi_strerror(conn, major_status)); return 1; } return 0; |