Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
81e418ef
Commit
81e418ef
authored
Apr 19, 2021
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wldap32: Use wide character string literals.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8a52b16e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
13 deletions
+4
-13
init.c
dlls/wldap32/init.c
+4
-7
winldap_private.h
dlls/wldap32/winldap_private.h
+0
-6
No files found.
dlls/wldap32/init.c
View file @
81e418ef
...
...
@@ -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
);
...
...
dlls/wldap32/winldap_private.h
View file @
81e418ef
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment