summaryrefslogtreecommitdiff
path: root/lib/socks_sspi.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-07-05 22:16:15 +0200
committerYang Tse <yangsita@gmail.com>2012-07-05 22:18:11 +0200
commite77d8670685d38d80c940877a4fdfa3382c4d6cc (patch)
tree91b785d4fc38e8b741c62f8335b9a1bf5f5e7b1c /lib/socks_sspi.c
parent1b27bb446fad52d94a44d1d9bb5ee4b9c65d1e24 (diff)
downloadcurl-e77d8670685d38d80c940877a4fdfa3382c4d6cc.tar.gz
unicode NTLM SSPI: cleanup
Reduce the number of #ifdef UNICODE directives used in source files.
Diffstat (limited to 'lib/socks_sspi.c')
-rw-r--r--lib/socks_sspi.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/socks_sspi.c b/lib/socks_sspi.c
index 43e0064a5..edebf7a47 100644
--- a/lib/socks_sspi.c
+++ b/lib/socks_sspi.c
@@ -161,13 +161,11 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
/* errors, keep sending it... */
for(;;) {
TCHAR *sname;
-#ifdef UNICODE
- sname = Curl_convert_UTF8_to_wchar(service_name);
+
+ sname = Curl_convert_UTF8_to_tchar(service_name);
if(!sname)
return CURLE_OUT_OF_MEMORY;
-#else
- sname = service_name;
-#endif
+
status = s_pSecFn->InitializeSecurityContext(&cred_handle,
context_handle,
sname,
@@ -184,9 +182,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
&sspi_ret_flags,
&expiry);
-#ifdef UNICODE
- Curl_safefree(sname);
-#endif
+ Curl_unicodefree(sname);
if(sspi_recv_token.pvBuffer) {
s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer);