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
74db5a19
Commit
74db5a19
authored
Feb 27, 2007
by
Jeff Latimer
Committed by
Alexandre Julliard
Feb 28, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Set default timeout in NtCreateMailslotFile if parameter is NULL.
parent
cb489f7a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
file.c
dlls/ntdll/file.c
+10
-1
file.c
dlls/ntdll/tests/file.c
+11
-0
No files found.
dlls/ntdll/file.c
View file @
74db5a19
...
...
@@ -2202,6 +2202,7 @@ NTSTATUS WINAPI NtCreateMailslotFile(PHANDLE pHandle, ULONG DesiredAccess,
ULONG
CreateOptions
,
ULONG
MailslotQuota
,
ULONG
MaxMessageSize
,
PLARGE_INTEGER
TimeOut
)
{
LARGE_INTEGER
timeout
;
static
const
WCHAR
leadin
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
,
'M'
,
'A'
,
'I'
,
'L'
,
'S'
,
'L'
,
'O'
,
'T'
,
'\\'
};
NTSTATUS
ret
;
...
...
@@ -2219,13 +2220,21 @@ NTSTATUS WINAPI NtCreateMailslotFile(PHANDLE pHandle, ULONG DesiredAccess,
return
STATUS_OBJECT_NAME_INVALID
;
}
/*
* For a NULL TimeOut pointer set the default timeout value
*/
if
(
!
TimeOut
)
timeout
.
QuadPart
=
-
1
;
else
timeout
.
QuadPart
=
TimeOut
->
QuadPart
;
SERVER_START_REQ
(
create_mailslot
)
{
req
->
access
=
DesiredAccess
;
req
->
attributes
=
attr
->
Attributes
;
req
->
rootdir
=
attr
->
RootDirectory
;
req
->
max_msgsize
=
MaxMessageSize
;
req
->
read_timeout
=
(
TimeOut
->
QuadPart
<=
0
)
?
TimeOut
->
QuadPart
/
-
10000
:
-
1
;
req
->
read_timeout
=
(
timeout
.
QuadPart
<=
0
)
?
timeout
.
QuadPart
/
-
10000
:
-
1
;
wine_server_add_data
(
req
,
attr
->
ObjectName
->
Buffer
,
attr
->
ObjectName
->
Length
);
ret
=
wine_server_call
(
req
);
...
...
dlls/ntdll/tests/file.c
View file @
74db5a19
...
...
@@ -70,6 +70,17 @@ static void nt_mailslot_test(void)
ok
(
rc
==
STATUS_ACCESS_VIOLATION
,
"rc = %x not c0000005 STATUS_ACCESS_VIOLATION
\n
"
,
rc
);
/*
* Test to see if the Timeout can be NULL
*/
rc
=
pNtCreateMailslotFile
(
&
hslot
,
DesiredAccess
,
&
attr
,
&
IoStatusBlock
,
CreateOptions
,
MailslotQuota
,
MaxMessageSize
,
NULL
);
ok
(
rc
==
STATUS_SUCCESS
,
"rc = %x not STATUS_SUCCESS
\n
"
,
rc
);
ok
(
hslot
!=
0
,
"Handle is invalid
\n
"
);
if
(
rc
==
STATUS_SUCCESS
)
rc
=
pNtClose
(
hslot
);
/*
* Test a valid call
*/
rc
=
pNtCreateMailslotFile
(
&
hslot
,
DesiredAccess
,
...
...
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