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
ff1f320a
Commit
ff1f320a
authored
Apr 26, 2002
by
Martin Wilck
Committed by
Alexandre Julliard
Apr 26, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some bugs in my recently submitted patch series.
parent
b0b3c385
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
14 deletions
+35
-14
socket.c
dlls/winsock/socket.c
+1
-1
file.c
files/file.c
+0
-10
file.c
server/file.c
+11
-0
serial.c
server/serial.c
+16
-0
sock.c
server/sock.c
+7
-3
No files found.
dlls/winsock/socket.c
View file @
ff1f320a
...
...
@@ -2487,7 +2487,7 @@ INT WINAPI WSASendTo( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
goto
error
;
}
iovec
=
WS_ALLOC
(
dwBufferCount
*
sizeof
(
struct
iovec
)
);
iovec
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwBufferCount
*
sizeof
(
struct
iovec
)
);
if
(
!
iovec
)
{
...
...
files/file.c
View file @
ff1f320a
...
...
@@ -1562,11 +1562,6 @@ static BOOL FILE_ReadFileEx(HANDLE hFile, LPVOID buffer, DWORD bytesToRead,
WARN
(
"Couldn't get FD
\n
"
);
return
FALSE
;
}
if
(
!
(
flags
&
FD_FLAG_OVERLAPPED
)
)
{
WARN
(
"fd is not overlapped
\n
"
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
goto
error
;
}
ovp
=
(
async_fileio
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
async_fileio
));
if
(
!
ovp
)
...
...
@@ -1790,11 +1785,6 @@ static BOOL FILE_WriteFileEx(HANDLE hFile, LPCVOID buffer, DWORD bytesToWrite,
TRACE
(
"Couldn't get FD
\n
"
);
return
FALSE
;
}
if
(
!
(
flags
&
FD_FLAG_OVERLAPPED
)
)
{
WARN
(
"fd is not overlapped
\n
"
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
goto
error
;
}
ovp
=
(
async_fileio
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
async_fileio
));
if
(
!
ovp
)
...
...
server/file.c
View file @
ff1f320a
...
...
@@ -389,6 +389,8 @@ static void file_queue_async(struct object *obj, void *ptr, unsigned int status,
if
(
status
==
STATUS_PENDING
)
{
struct
pollfd
pfd
;
if
(
!
async
)
async
=
create_async
(
obj
,
current
,
ptr
);
if
(
!
async
)
...
...
@@ -397,6 +399,15 @@ static void file_queue_async(struct object *obj, void *ptr, unsigned int status,
async
->
status
=
STATUS_PENDING
;
if
(
!
async
->
q
)
async_insert
(
q
,
async
);
/* Check if the new pending request can be served immediately */
pfd
.
fd
=
obj
->
fd
;
pfd
.
events
=
file_get_poll_events
(
obj
);
pfd
.
revents
=
0
;
poll
(
&
pfd
,
1
,
0
);
if
(
pfd
.
revents
)
file_poll_event
(
obj
,
pfd
.
revents
);
}
else
if
(
async
)
destroy_async
(
async
);
else
set_error
(
STATUS_INVALID_PARAMETER
);
...
...
server/serial.c
View file @
ff1f320a
...
...
@@ -21,6 +21,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <fcntl.h>
...
...
@@ -282,6 +283,8 @@ static void serial_queue_async(struct object *obj, void *ptr, unsigned int statu
if
(
status
==
STATUS_PENDING
)
{
struct
pollfd
pfd
;
if
(
!
async
)
async
=
create_async
(
obj
,
current
,
ptr
);
if
(
!
async
)
...
...
@@ -293,6 +296,19 @@ static void serial_queue_async(struct object *obj, void *ptr, unsigned int statu
async_add_timeout
(
async
,
timeout
);
async_insert
(
q
,
async
);
}
/* Check if the new pending request can be served immediately */
pfd
.
fd
=
obj
->
fd
;
pfd
.
events
=
serial_get_poll_events
(
obj
);
pfd
.
revents
=
0
;
poll
(
&
pfd
,
1
,
0
);
if
(
pfd
.
revents
)
/* serial_poll_event() calls set_select_events() */
serial_poll_event
(
obj
,
pfd
.
revents
);
else
set_select_events
(
obj
,
pfd
.
events
);
return
;
}
else
if
(
async
)
destroy_async
(
async
);
else
set_error
(
STATUS_INVALID_PARAMETER
);
...
...
server/sock.c
View file @
ff1f320a
...
...
@@ -250,7 +250,6 @@ static void sock_poll_event( struct object *obj, int event )
sock
->
errors
[
FD_CONNECT_BIT
]
=
sock_error
(
sock
->
obj
.
fd
);
if
(
debug_level
)
fprintf
(
stderr
,
"socket %d connection failure
\n
"
,
sock
->
obj
.
fd
);
set_select_events
(
&
sock
->
obj
,
-
1
);
}
}
else
if
(
sock
->
state
&
FD_WINE_LISTENING
)
...
...
@@ -269,7 +268,6 @@ static void sock_poll_event( struct object *obj, int event )
sock
->
pmask
|=
FD_ACCEPT
;
sock
->
errors
[
FD_ACCEPT_BIT
]
=
sock_error
(
sock
->
obj
.
fd
);
sock
->
hmask
|=
FD_ACCEPT
;
set_select_events
(
&
sock
->
obj
,
-
1
);
}
}
else
{
...
...
@@ -335,10 +333,16 @@ static void sock_poll_event( struct object *obj, int event )
if
(
debug_level
)
fprintf
(
stderr
,
"socket %d aborted by error %d, event: %x - removing from select loop
\n
"
,
sock
->
obj
.
fd
,
sock
->
errors
[
FD_CLOSE_BIT
],
event
);
set_select_events
(
&
sock
->
obj
,
-
1
);
}
}
if
(
sock
->
pmask
&
FD_CLOSE
||
event
&
(
POLLERR
|
POLLHUP
)
)
{
if
(
debug_level
)
fprintf
(
stderr
,
"removing socket %d from select loop
\n
"
,
sock
->
obj
.
fd
);
set_select_events
(
&
sock
->
obj
,
-
1
);
}
else
sock_reselect
(
sock
);
/* wake up anyone waiting for whatever just happened */
...
...
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