Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3fbf6bdf
Commit
3fbf6bdf
authored
Aug 18, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Aug 18, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wldap32: Fix handling of zero timeout value in ldap_search_extW.
Based on a patch by Adam Romanek.
parent
378bb21f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
4 deletions
+28
-4
search.c
dlls/wldap32/search.c
+8
-4
parse.c
dlls/wldap32/tests/parse.c
+20
-0
No files found.
dlls/wldap32/search.c
View file @
3fbf6bdf
...
@@ -243,7 +243,7 @@ ULONG CDECL ldap_search_extW( WLDAP32_LDAP *ld, PWCHAR base, ULONG scope,
...
@@ -243,7 +243,7 @@ ULONG CDECL ldap_search_extW( WLDAP32_LDAP *ld, PWCHAR base, ULONG scope,
#ifdef HAVE_LDAP
#ifdef HAVE_LDAP
char
*
baseU
=
NULL
,
*
filterU
=
NULL
,
**
attrsU
=
NULL
;
char
*
baseU
=
NULL
,
*
filterU
=
NULL
,
**
attrsU
=
NULL
;
LDAPControl
**
serverctrlsU
=
NULL
,
**
clientctrlsU
=
NULL
;
LDAPControl
**
serverctrlsU
=
NULL
,
**
clientctrlsU
=
NULL
;
struct
timeval
tv
;
struct
timeval
tv
,
*
tvp
=
NULL
;
ret
=
WLDAP32_LDAP_NO_MEMORY
;
ret
=
WLDAP32_LDAP_NO_MEMORY
;
...
@@ -274,11 +274,15 @@ ULONG CDECL ldap_search_extW( WLDAP32_LDAP *ld, PWCHAR base, ULONG scope,
...
@@ -274,11 +274,15 @@ ULONG CDECL ldap_search_extW( WLDAP32_LDAP *ld, PWCHAR base, ULONG scope,
if
(
!
clientctrlsU
)
goto
exit
;
if
(
!
clientctrlsU
)
goto
exit
;
}
}
tv
.
tv_sec
=
timelimit
;
if
(
timelimit
)
tv
.
tv_usec
=
0
;
{
tv
.
tv_sec
=
timelimit
;
tv
.
tv_usec
=
0
;
tvp
=
&
tv
;
}
ret
=
map_error
(
ldap_search_ext
(
ld
,
baseU
,
scope
,
filterU
,
attrsU
,
attrsonly
,
ret
=
map_error
(
ldap_search_ext
(
ld
,
baseU
,
scope
,
filterU
,
attrsU
,
attrsonly
,
serverctrlsU
,
clientctrlsU
,
&
tv
,
sizelimit
,
(
int
*
)
message
));
serverctrlsU
,
clientctrlsU
,
tvp
,
sizelimit
,
(
int
*
)
message
));
exit:
exit:
strfreeU
(
baseU
);
strfreeU
(
baseU
);
...
...
dlls/wldap32/tests/parse.c
View file @
3fbf6bdf
...
@@ -86,6 +86,25 @@ static void test_ldap_parse_sort_control( LDAP *ld )
...
@@ -86,6 +86,25 @@ static void test_ldap_parse_sort_control( LDAP *ld )
ldap_controls_free
(
server_ctrls
);
ldap_controls_free
(
server_ctrls
);
}
}
static
void
test_ldap_search_extW
(
LDAP
*
ld
)
{
ULONG
ret
,
message
,
timelimit
;
WCHAR
base
[]
=
{
0
},
filter
[]
=
{
'o'
,
'u'
,
'='
,
'*'
,
0
};
timelimit
=
20
;
ret
=
ldap_search_extW
(
ld
,
base
,
LDAP_SCOPE_SUBTREE
,
filter
,
NULL
,
0
,
NULL
,
NULL
,
timelimit
,
0
,
&
message
);
if
(
ret
==
LDAP_SERVER_DOWN
)
{
skip
(
"test server can't be reached
\n
"
);
return
;
}
ok
(
!
ret
,
"ldap_search_extW failed 0x%08x
\n
"
,
ret
);
timelimit
=
0
;
ret
=
ldap_search_extW
(
ld
,
base
,
LDAP_SCOPE_SUBTREE
,
filter
,
NULL
,
0
,
NULL
,
NULL
,
timelimit
,
0
,
&
message
);
ok
(
!
ret
,
"ldap_search_extW failed 0x%08x
\n
"
,
ret
);
}
START_TEST
(
parse
)
START_TEST
(
parse
)
{
{
LDAP
*
ld
;
LDAP
*
ld
;
...
@@ -94,5 +113,6 @@ START_TEST (parse)
...
@@ -94,5 +113,6 @@ START_TEST (parse)
ok
(
ld
!=
NULL
,
"ldap_init failed
\n
"
);
ok
(
ld
!=
NULL
,
"ldap_init failed
\n
"
);
test_ldap_parse_sort_control
(
ld
);
test_ldap_parse_sort_control
(
ld
);
test_ldap_search_extW
(
ld
);
ldap_unbind
(
ld
);
ldap_unbind
(
ld
);
}
}
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