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
02fc8863
Commit
02fc8863
authored
Nov 03, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Retrieve mailslot message info from the client side.
parent
511e0bb6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
28 deletions
+21
-28
file.c
dlls/ntdll/file.c
+19
-2
server_protocol.h
include/wine/server_protocol.h
+1
-3
mailslot.c
server/mailslot.c
+0
-18
protocol.def
server/protocol.def
+0
-2
trace.c
server/trace.c
+1
-3
No files found.
dlls/ntdll/file.c
View file @
02fc8863
...
...
@@ -1350,12 +1350,29 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
{
info
->
MaximumMessageSize
=
reply
->
max_msgsize
;
info
->
MailslotQuota
=
0
;
info
->
NextMessageSize
=
reply
->
next_msgsize
;
info
->
MessagesAvailable
=
reply
->
msg_count
;
info
->
NextMessageSize
=
0
;
info
->
MessagesAvailable
=
0
;
info
->
ReadTimeout
.
QuadPart
=
reply
->
read_timeout
*
-
10000
;
}
}
SERVER_END_REQ
;
if
(
!
io
->
u
.
Status
)
{
ULONG
size
=
info
->
MaximumMessageSize
?
info
->
MaximumMessageSize
:
0x10000
;
char
*
tmpbuf
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
size
);
if
(
tmpbuf
)
{
int
fd
,
needs_close
;
if
(
!
server_get_unix_fd
(
hFile
,
FILE_READ_DATA
,
&
fd
,
&
needs_close
,
NULL
))
{
int
res
=
recv
(
fd
,
tmpbuf
,
size
,
MSG_PEEK
);
info
->
MessagesAvailable
=
(
res
>
0
);
info
->
NextMessageSize
=
(
res
>=
0
)
?
res
:
MAILSLOT_NO_MESSAGE
;
if
(
needs_close
)
close
(
fd
);
}
RtlFreeHeap
(
GetProcessHeap
(),
0
,
tmpbuf
);
}
}
}
break
;
case
FilePipeLocalInformation
:
...
...
include/wine/server_protocol.h
View file @
02fc8863
...
...
@@ -3666,8 +3666,6 @@ struct set_mailslot_info_reply
struct
reply_header
__header
;
unsigned
int
max_msgsize
;
int
read_timeout
;
unsigned
int
msg_count
;
unsigned
int
next_msgsize
;
};
#define MAILSLOT_SET_READ_TIMEOUT 1
...
...
@@ -4406,6 +4404,6 @@ union generic_reply
struct
query_symlink_reply
query_symlink_reply
;
};
#define SERVER_PROTOCOL_VERSION 25
8
#define SERVER_PROTOCOL_VERSION 25
9
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/mailslot.c
View file @
02fc8863
...
...
@@ -212,16 +212,6 @@ static int mailslot_message_count(struct mailslot *mailslot)
return
(
poll
(
&
pfd
,
1
,
0
)
==
1
)
?
1
:
0
;
}
static
int
mailslot_next_msg_size
(
struct
mailslot
*
mailslot
)
{
int
size
,
fd
;
size
=
0
;
fd
=
get_unix_fd
(
mailslot
->
fd
);
ioctl
(
fd
,
FIONREAD
,
&
size
);
return
size
;
}
static
int
mailslot_get_info
(
struct
fd
*
fd
)
{
struct
mailslot
*
mailslot
=
get_fd_user
(
fd
);
...
...
@@ -541,14 +531,6 @@ DECL_HANDLER(set_mailslot_info)
mailslot
->
read_timeout
=
req
->
read_timeout
;
reply
->
max_msgsize
=
mailslot
->
max_msgsize
;
reply
->
read_timeout
=
mailslot
->
read_timeout
;
reply
->
msg_count
=
mailslot_message_count
(
mailslot
);
/* get the size of the next message */
if
(
reply
->
msg_count
)
reply
->
next_msgsize
=
mailslot_next_msg_size
(
mailslot
);
else
reply
->
next_msgsize
=
MAILSLOT_NO_MESSAGE
;
release_object
(
mailslot
);
}
}
server/protocol.def
View file @
02fc8863
...
...
@@ -2578,8 +2578,6 @@ enum message_type
@REPLY
unsigned int max_msgsize;
int read_timeout;
unsigned int msg_count;
unsigned int next_msgsize;
@END
#define MAILSLOT_SET_READ_TIMEOUT 1
...
...
server/trace.c
View file @
02fc8863
...
...
@@ -3186,9 +3186,7 @@ static void dump_set_mailslot_info_request( const struct set_mailslot_info_reque
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=%d,"
,
req
->
read_timeout
);
fprintf
(
stderr
,
" msg_count=%08x,"
,
req
->
msg_count
);
fprintf
(
stderr
,
" next_msgsize=%08x"
,
req
->
next_msgsize
);
fprintf
(
stderr
,
" read_timeout=%d"
,
req
->
read_timeout
);
}
static
void
dump_create_directory_request
(
const
struct
create_directory_request
*
req
)
...
...
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