Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
850ee4ba
Commit
850ee4ba
authored
21 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Authors: David Hammerton <david@transgaming.com>, Mike McCormack <mike@codeweavers.com>
Completed PeekNamedPipe implementation.
parent
e8fedffa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/kernel/sync.c
+22
-6
22 additions, 6 deletions
dlls/kernel/sync.c
with
22 additions
and
6 deletions
dlls/kernel/sync.c
+
22
−
6
View file @
850ee4ba
...
...
@@ -32,6 +32,9 @@
#ifdef HAVE_SYS_POLL_H
#include
<sys/poll.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include
<sys/socket.h>
#endif
#include
<stdarg.h>
#include
<stdio.h>
...
...
@@ -1117,13 +1120,26 @@ BOOL WINAPI PeekNamedPipe( HANDLE hPipe, LPVOID lpvBuffer, DWORD cbBuffer,
return
FALSE
;
}
}
wine_server_release_fd
(
hPipe
,
fd
);
TRACE
(
" 0x%08x bytes available
\n
"
,
avail
);
if
(
!
lpvBuffer
&&
lpcbAvail
)
{
*
lpcbAvail
=
avail
;
return
TRUE
;
}
ret
=
TRUE
;
if
(
lpcbAvail
)
*
lpcbAvail
=
avail
;
if
(
lpcbRead
)
*
lpcbRead
=
0
;
if
(
avail
&&
lpvBuffer
)
{
int
readbytes
=
(
avail
<
cbBuffer
)
?
avail
:
cbBuffer
;
readbytes
=
recv
(
fd
,
lpvBuffer
,
readbytes
,
MSG_PEEK
);
if
(
readbytes
<
0
)
{
WARN
(
"failed to peek socket (%d)
\n
"
,
errno
);
ret
=
FALSE
;
}
else
if
(
lpcbRead
)
*
lpcbRead
=
readbytes
;
}
wine_server_release_fd
(
hPipe
,
fd
);
return
ret
;
#endif
/* defined(FIONREAD) */
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment