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
86397e1d
Commit
86397e1d
authored
Nov 21, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed handling of mailslot read timeout to avoid compiler warnings.
parent
7bde557d
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
14 deletions
+16
-14
sync.c
dlls/kernel/sync.c
+3
-0
file.c
dlls/ntdll/file.c
+1
-1
server_protocol.h
include/wine/server_protocol.h
+4
-4
mailslot.c
server/mailslot.c
+2
-3
protocol.def
server/protocol.def
+3
-3
trace.c
server/trace.c
+3
-3
No files found.
dlls/kernel/sync.c
View file @
86397e1d
...
...
@@ -1672,7 +1672,10 @@ HANDLE WINAPI CreateMailslotW( LPCWSTR lpName, DWORD nMaxMessageSize,
attr
.
SecurityDescriptor
=
sa
?
sa
->
lpSecurityDescriptor
:
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
if
(
lReadTimeout
!=
MAILSLOT_WAIT_FOREVER
)
timeout
.
QuadPart
=
(
ULONGLONG
)
lReadTimeout
*
-
10000
;
else
timeout
.
QuadPart
=
((
LONGLONG
)
0x7fffffff
<<
32
)
|
0xffffffff
;
status
=
NtCreateMailslotFile
(
&
handle
,
GENERIC_READ
|
GENERIC_WRITE
,
&
attr
,
&
iosb
,
0
,
0
,
nMaxMessageSize
,
&
timeout
);
...
...
dlls/ntdll/file.c
View file @
86397e1d
...
...
@@ -2061,7 +2061,7 @@ NTSTATUS WINAPI NtCreateMailslotFile(PHANDLE pHandle, ULONG DesiredAccess,
req
->
access
=
DesiredAccess
;
req
->
attributes
=
(
attr
)
?
attr
->
Attributes
:
0
;
req
->
max_msgsize
=
MaxMessageSize
;
req
->
read_timeout
=
TimeOut
->
QuadPart
/
-
10000
;
req
->
read_timeout
=
(
TimeOut
->
QuadPart
<=
0
)
?
TimeOut
->
QuadPart
/
-
10000
:
-
1
;
wine_server_add_data
(
req
,
attr
->
ObjectName
->
Buffer
+
4
,
attr
->
ObjectName
->
Length
-
4
*
sizeof
(
WCHAR
)
);
ret
=
wine_server_call
(
req
);
...
...
include/wine/server_protocol.h
View file @
86397e1d
...
...
@@ -3532,7 +3532,7 @@ struct create_mailslot_request
unsigned
int
access
;
unsigned
int
attributes
;
unsigned
int
max_msgsize
;
unsigned
int
read_timeout
;
int
read_timeout
;
/* VARARG(name,unicode_str); */
};
struct
create_mailslot_reply
...
...
@@ -3564,13 +3564,13 @@ struct set_mailslot_info_request
struct
request_header
__header
;
obj_handle_t
handle
;
unsigned
int
flags
;
unsigned
int
read_timeout
;
int
read_timeout
;
};
struct
set_mailslot_info_reply
{
struct
reply_header
__header
;
unsigned
int
max_msgsize
;
unsigned
int
read_timeout
;
int
read_timeout
;
unsigned
int
msg_count
;
unsigned
int
next_msgsize
;
};
...
...
@@ -4208,6 +4208,6 @@ union generic_reply
struct
set_mailslot_info_reply
set_mailslot_info_reply
;
};
#define SERVER_PROTOCOL_VERSION 19
8
#define SERVER_PROTOCOL_VERSION 19
9
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/mailslot.c
View file @
86397e1d
...
...
@@ -56,7 +56,7 @@ struct mailslot
struct
fd
*
fd
;
struct
fd
*
write_fd
;
unsigned
int
max_msgsize
;
unsigned
int
read_timeout
;
int
read_timeout
;
struct
list
writers
;
};
...
...
@@ -207,8 +207,7 @@ static void mailslot_queue_async( struct fd *fd, void *apc, void *user,
return
;
}
if
(
mailslot
->
read_timeout
!=
MAILSLOT_WAIT_FOREVER
)
timeout
=
&
mailslot
->
read_timeout
;
if
(
mailslot
->
read_timeout
!=
-
1
)
timeout
=
&
mailslot
->
read_timeout
;
fd_queue_async_timeout
(
fd
,
apc
,
user
,
iosb
,
type
,
count
,
timeout
);
}
...
...
server/protocol.def
View file @
86397e1d
...
...
@@ -2475,7 +2475,7 @@ enum message_type
unsigned int access; /* wanted access rights */
unsigned int attributes; /* object attributes */
unsigned int max_msgsize;
unsigned int
read_timeout;
int
read_timeout;
VARARG(name,unicode_str); /* mailslot name */
@REPLY
obj_handle_t handle; /* handle to the mailslot */
...
...
@@ -2497,10 +2497,10 @@ enum message_type
@REQ(set_mailslot_info)
obj_handle_t handle; /* handle to the mailslot */
unsigned int flags;
unsigned int
read_timeout;
int
read_timeout;
@REPLY
unsigned int max_msgsize;
unsigned int
read_timeout;
int
read_timeout;
unsigned int msg_count;
unsigned int next_msgsize;
@END
...
...
server/trace.c
View file @
86397e1d
...
...
@@ -3052,7 +3052,7 @@ static void dump_create_mailslot_request( const struct create_mailslot_request *
fprintf
(
stderr
,
" access=%08x,"
,
req
->
access
);
fprintf
(
stderr
,
" attributes=%08x,"
,
req
->
attributes
);
fprintf
(
stderr
,
" max_msgsize=%08x,"
,
req
->
max_msgsize
);
fprintf
(
stderr
,
" read_timeout=%
08x
,"
,
req
->
read_timeout
);
fprintf
(
stderr
,
" read_timeout=%
d
,"
,
req
->
read_timeout
);
fprintf
(
stderr
,
" name="
);
dump_varargs_unicode_str
(
cur_size
);
}
...
...
@@ -3080,13 +3080,13 @@ static void dump_set_mailslot_info_request( const struct set_mailslot_info_reque
{
fprintf
(
stderr
,
" handle=%p,"
,
req
->
handle
);
fprintf
(
stderr
,
" flags=%08x,"
,
req
->
flags
);
fprintf
(
stderr
,
" read_timeout=%
08x
"
,
req
->
read_timeout
);
fprintf
(
stderr
,
" read_timeout=%
d
"
,
req
->
read_timeout
);
}
static
void
dump_set_mailslot_info_reply
(
const
struct
set_mailslot_info_reply
*
req
)
{
fprintf
(
stderr
,
" max_msgsize=%08x,"
,
req
->
max_msgsize
);
fprintf
(
stderr
,
" read_timeout=%
08x
,"
,
req
->
read_timeout
);
fprintf
(
stderr
,
" read_timeout=%
d
,"
,
req
->
read_timeout
);
fprintf
(
stderr
,
" msg_count=%08x,"
,
req
->
msg_count
);
fprintf
(
stderr
,
" next_msgsize=%08x"
,
req
->
next_msgsize
);
}
...
...
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