Commit 81e418ef authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wldap32: Use wide character string literals.

parent 8a52b16e
......@@ -30,9 +30,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(wldap32);
/* Should eventually be determined by the algorithm documented on MSDN. */
static const WCHAR defaulthost[] = { 'l','o','c','a','l','h','o','s','t',0 };
/* Split a space separated string of hostnames into a string array */
static char **split_hostnames( const char *hostnames )
{
......@@ -256,7 +253,7 @@ WLDAP32_LDAP * CDECL cldap_openW( WCHAR *hostname, ULONG portnumber )
TRACE( "(%s, %d)\n", debugstr_w(hostname), portnumber );
if (!(hostnameU = strWtoU( hostname ? hostname : defaulthost ))) return NULL;
if (!(hostnameU = strWtoU( hostname ? hostname : L"localhost" ))) return NULL;
if (!(url = urlify_hostnames( "cldap://", hostnameU, portnumber ))) goto exit;
ld = create_context( url );
......@@ -342,7 +339,7 @@ WLDAP32_LDAP * CDECL ldap_initW( const PWCHAR hostname, ULONG portnumber )
TRACE( "(%s, %d)\n", debugstr_w(hostname), portnumber );
if (!(hostnameU = strWtoU( hostname ? hostname : defaulthost ))) return NULL;
if (!(hostnameU = strWtoU( hostname ? hostname : L"localhost" ))) return NULL;
if (!(url = urlify_hostnames( "ldap://", hostnameU, portnumber ))) goto exit;
ld = create_context( url );
......@@ -401,7 +398,7 @@ WLDAP32_LDAP * CDECL ldap_openW( WCHAR *hostname, ULONG portnumber )
TRACE( "(%s, %d)\n", debugstr_w(hostname), portnumber );
if (!(hostnameU = strWtoU( hostname ? hostname : defaulthost ))) return NULL;
if (!(hostnameU = strWtoU( hostname ? hostname : L"localhost" ))) return NULL;
if (!(url = urlify_hostnames( "ldap://", hostnameU, portnumber ))) goto exit;
ld = create_context( url );
......@@ -462,7 +459,7 @@ WLDAP32_LDAP * CDECL ldap_sslinitW( WCHAR *hostname, ULONG portnumber, int secur
TRACE( "(%s, %d, 0x%08x)\n", debugstr_w(hostname), portnumber, secure );
if (!(hostnameU = strWtoU( hostname ? hostname : defaulthost ))) return NULL;
if (!(hostnameU = strWtoU( hostname ? hostname : L"localhost" ))) return NULL;
if (secure)
url = urlify_hostnames( "ldaps://", hostnameU, portnumber );
......
......@@ -220,15 +220,9 @@ typedef struct ldap_version_info
#define LDAP_SERVER_RESP_SORT_OID "1.2.840.113556.1.4.474"
#define LDAP_CONTROL_VLVRESPONSE "2.16.840.1.113730.3.4.10"
#if defined(_MSC_VER) || defined(__MINGW32__)
#define LDAP_PAGED_RESULT_OID_STRING_W L"1.2.840.113556.1.4.319"
#define LDAP_SERVER_RESP_SORT_OID_W L"1.2.840.113556.1.4.474"
#define LDAP_CONTROL_VLVRESPONSE_W L"2.16.840.1.113730.3.4.10"
#else
static const WCHAR LDAP_PAGED_RESULT_OID_STRING_W[] = {'1','.','2','.','8','4','0','.','1','1','3','5','5','6','.','1','.','4','.','3','1','9',0};
static const WCHAR LDAP_SERVER_RESP_SORT_OID_W[] = {'1','.','2','.','8','4','0','.','1','1','3','5','5','6','.','1','.','4','.','4','7','4',0};
static const WCHAR LDAP_CONTROL_VLVRESPONSE_W[] = {'2','.','1','6','.','8','4','0','.','1','.','1','1','3','7','3','0','.','3','.','4','.','1','0',0};
#endif
typedef struct ldapcontrolA
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment