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
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
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
15 deletions
+36
-15
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
+8
-4
No files found.
dlls/winsock/socket.c
View file @
ff1f320a
...
@@ -2487,7 +2487,7 @@ INT WINAPI WSASendTo( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
...
@@ -2487,7 +2487,7 @@ INT WINAPI WSASendTo( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
goto
error
;
goto
error
;
}
}
iovec
=
WS_ALLOC
(
dwBufferCount
*
sizeof
(
struct
iovec
)
);
iovec
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwBufferCount
*
sizeof
(
struct
iovec
)
);
if
(
!
iovec
)
if
(
!
iovec
)
{
{
...
...
files/file.c
View file @
ff1f320a
...
@@ -1562,11 +1562,6 @@ static BOOL FILE_ReadFileEx(HANDLE hFile, LPVOID buffer, DWORD bytesToRead,
...
@@ -1562,11 +1562,6 @@ static BOOL FILE_ReadFileEx(HANDLE hFile, LPVOID buffer, DWORD bytesToRead,
WARN
(
"Couldn't get FD
\n
"
);
WARN
(
"Couldn't get FD
\n
"
);
return
FALSE
;
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
));
ovp
=
(
async_fileio
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
async_fileio
));
if
(
!
ovp
)
if
(
!
ovp
)
...
@@ -1790,11 +1785,6 @@ static BOOL FILE_WriteFileEx(HANDLE hFile, LPCVOID buffer, DWORD bytesToWrite,
...
@@ -1790,11 +1785,6 @@ static BOOL FILE_WriteFileEx(HANDLE hFile, LPCVOID buffer, DWORD bytesToWrite,
TRACE
(
"Couldn't get FD
\n
"
);
TRACE
(
"Couldn't get FD
\n
"
);
return
FALSE
;
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
));
ovp
=
(
async_fileio
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
async_fileio
));
if
(
!
ovp
)
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,
...
@@ -389,6 +389,8 @@ static void file_queue_async(struct object *obj, void *ptr, unsigned int status,
if
(
status
==
STATUS_PENDING
)
if
(
status
==
STATUS_PENDING
)
{
{
struct
pollfd
pfd
;
if
(
!
async
)
if
(
!
async
)
async
=
create_async
(
obj
,
current
,
ptr
);
async
=
create_async
(
obj
,
current
,
ptr
);
if
(
!
async
)
if
(
!
async
)
...
@@ -397,6 +399,15 @@ static void file_queue_async(struct object *obj, void *ptr, unsigned int status,
...
@@ -397,6 +399,15 @@ static void file_queue_async(struct object *obj, void *ptr, unsigned int status,
async
->
status
=
STATUS_PENDING
;
async
->
status
=
STATUS_PENDING
;
if
(
!
async
->
q
)
if
(
!
async
->
q
)
async_insert
(
q
,
async
);
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
if
(
async
)
destroy_async
(
async
);
else
set_error
(
STATUS_INVALID_PARAMETER
);
else
set_error
(
STATUS_INVALID_PARAMETER
);
...
...
server/serial.c
View file @
ff1f320a
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
*/
*/
#include "config.h"
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <assert.h>
#include <fcntl.h>
#include <fcntl.h>
...
@@ -282,6 +283,8 @@ static void serial_queue_async(struct object *obj, void *ptr, unsigned int statu
...
@@ -282,6 +283,8 @@ static void serial_queue_async(struct object *obj, void *ptr, unsigned int statu
if
(
status
==
STATUS_PENDING
)
if
(
status
==
STATUS_PENDING
)
{
{
struct
pollfd
pfd
;
if
(
!
async
)
if
(
!
async
)
async
=
create_async
(
obj
,
current
,
ptr
);
async
=
create_async
(
obj
,
current
,
ptr
);
if
(
!
async
)
if
(
!
async
)
...
@@ -293,6 +296,19 @@ static void serial_queue_async(struct object *obj, void *ptr, unsigned int statu
...
@@ -293,6 +296,19 @@ static void serial_queue_async(struct object *obj, void *ptr, unsigned int statu
async_add_timeout
(
async
,
timeout
);
async_add_timeout
(
async
,
timeout
);
async_insert
(
q
,
async
);
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
if
(
async
)
destroy_async
(
async
);
else
set_error
(
STATUS_INVALID_PARAMETER
);
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 )
...
@@ -250,7 +250,6 @@ static void sock_poll_event( struct object *obj, int event )
sock
->
errors
[
FD_CONNECT_BIT
]
=
sock_error
(
sock
->
obj
.
fd
);
sock
->
errors
[
FD_CONNECT_BIT
]
=
sock_error
(
sock
->
obj
.
fd
);
if
(
debug_level
)
if
(
debug_level
)
fprintf
(
stderr
,
"socket %d connection failure
\n
"
,
sock
->
obj
.
fd
);
fprintf
(
stderr
,
"socket %d connection failure
\n
"
,
sock
->
obj
.
fd
);
set_select_events
(
&
sock
->
obj
,
-
1
);
}
}
}
else
}
else
if
(
sock
->
state
&
FD_WINE_LISTENING
)
if
(
sock
->
state
&
FD_WINE_LISTENING
)
...
@@ -269,7 +268,6 @@ static void sock_poll_event( struct object *obj, int event )
...
@@ -269,7 +268,6 @@ static void sock_poll_event( struct object *obj, int event )
sock
->
pmask
|=
FD_ACCEPT
;
sock
->
pmask
|=
FD_ACCEPT
;
sock
->
errors
[
FD_ACCEPT_BIT
]
=
sock_error
(
sock
->
obj
.
fd
);
sock
->
errors
[
FD_ACCEPT_BIT
]
=
sock_error
(
sock
->
obj
.
fd
);
sock
->
hmask
|=
FD_ACCEPT
;
sock
->
hmask
|=
FD_ACCEPT
;
set_select_events
(
&
sock
->
obj
,
-
1
);
}
}
}
else
}
else
{
{
...
@@ -335,11 +333,17 @@ static void sock_poll_event( struct object *obj, int event )
...
@@ -335,11 +333,17 @@ static void sock_poll_event( struct object *obj, int event )
if
(
debug_level
)
if
(
debug_level
)
fprintf
(
stderr
,
"socket %d aborted by error %d, event: %x - removing from select loop
\n
"
,
fprintf
(
stderr
,
"socket %d aborted by error %d, event: %x - removing from select loop
\n
"
,
sock
->
obj
.
fd
,
sock
->
errors
[
FD_CLOSE_BIT
],
event
);
sock
->
obj
.
fd
,
sock
->
errors
[
FD_CLOSE_BIT
],
event
);
set_select_events
(
&
sock
->
obj
,
-
1
);
}
}
}
}
sock_reselect
(
sock
);
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 */
/* wake up anyone waiting for whatever just happened */
if
(
sock
->
pmask
&
sock
->
mask
||
sock
->
flags
&
FD_FLAG_OVERLAPPED
)
sock_wake_up
(
sock
,
event
);
if
(
sock
->
pmask
&
sock
->
mask
||
sock
->
flags
&
FD_FLAG_OVERLAPPED
)
sock_wake_up
(
sock
,
event
);
...
...
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