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
e6258c54
Commit
e6258c54
authored
Jun 14, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Store the socket errors as an array of Unix errno values.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bbb126dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
sock.c
server/sock.c
+13
-13
No files found.
server/sock.c
View file @
e6258c54
...
...
@@ -167,7 +167,7 @@ struct sock
user_handle_t
window
;
/* window to send the message to */
unsigned
int
message
;
/* message to send */
obj_handle_t
wparam
;
/* message wparam (socket handle) */
unsigned
int
errors
[
AFD_POLL_BIT_COUNT
];
/* event errors */
int
errors
[
AFD_POLL_BIT_COUNT
];
/* event errors */
timeout_t
connect_time
;
/* time the socket was connected */
struct
sock
*
deferred
;
/* socket that waits for a deferred accept */
struct
async_queue
read_q
;
/* queue for asynchronous reads */
...
...
@@ -486,7 +486,7 @@ static void sock_wake_up( struct sock *sock )
enum
afd_poll_bit
event
=
event_bitorder
[
i
];
if
(
events
&
(
1
<<
event
))
{
lparam_t
lparam
=
afd_poll_flag_to_win32
(
1
<<
event
)
|
(
sock
->
errors
[
event
]
<<
16
);
lparam_t
lparam
=
afd_poll_flag_to_win32
(
1
<<
event
)
|
(
sock
_get_error
(
sock
->
errors
[
event
]
)
<<
16
);
post_message
(
sock
->
window
,
sock
->
message
,
sock
->
wparam
,
lparam
);
}
}
...
...
@@ -851,7 +851,7 @@ static int sock_dispatch_asyncs( struct sock *sock, int event, int error )
return
event
;
}
static
void
post_socket_event
(
struct
sock
*
sock
,
enum
afd_poll_bit
event_bit
,
unsigned
int
error
)
static
void
post_socket_event
(
struct
sock
*
sock
,
enum
afd_poll_bit
event_bit
,
int
error
)
{
unsigned
int
event
=
(
1
<<
event_bit
);
...
...
@@ -874,12 +874,12 @@ static void sock_dispatch_events( struct sock *sock, enum connection_state prevs
if
(
event
&
POLLOUT
)
post_socket_event
(
sock
,
AFD_POLL_BIT_CONNECT
,
0
);
if
(
event
&
(
POLLERR
|
POLLHUP
))
post_socket_event
(
sock
,
AFD_POLL_BIT_CONNECT_ERR
,
sock_get_error
(
error
)
);
post_socket_event
(
sock
,
AFD_POLL_BIT_CONNECT_ERR
,
error
);
break
;
case
SOCK_LISTENING
:
if
(
event
&
(
POLLIN
|
POLLERR
|
POLLHUP
))
post_socket_event
(
sock
,
AFD_POLL_BIT_ACCEPT
,
sock_get_error
(
error
)
);
post_socket_event
(
sock
,
AFD_POLL_BIT_ACCEPT
,
error
);
break
;
case
SOCK_CONNECTED
:
...
...
@@ -894,7 +894,7 @@ static void sock_dispatch_events( struct sock *sock, enum connection_state prevs
post_socket_event
(
sock
,
AFD_POLL_BIT_OOB
,
0
);
if
(
event
&
(
POLLERR
|
POLLHUP
))
post_socket_event
(
sock
,
AFD_POLL_BIT_HUP
,
sock_get_error
(
error
)
);
post_socket_event
(
sock
,
AFD_POLL_BIT_HUP
,
error
);
break
;
}
...
...
@@ -2457,13 +2457,13 @@ DECL_HANDLER(get_socket_event)
reply
->
mask
=
afd_poll_flag_to_win32
(
sock
->
mask
);
reply
->
pmask
=
afd_poll_flag_to_win32
(
sock
->
pending_events
);
errors
[
FD_READ_BIT
]
=
sock
->
errors
[
AFD_POLL_BIT_READ
]
;
errors
[
FD_WRITE_BIT
]
=
sock
->
errors
[
AFD_POLL_BIT_WRITE
]
;
errors
[
FD_OOB_BIT
]
=
sock
->
errors
[
AFD_POLL_BIT_OOB
]
;
errors
[
FD_ACCEPT_BIT
]
=
sock
->
errors
[
AFD_POLL_BIT_ACCEPT
]
;
errors
[
FD_CONNECT_BIT
]
=
sock
->
errors
[
AFD_POLL_BIT_CONNECT_ERR
]
;
if
(
!
(
errors
[
FD_CLOSE_BIT
]
=
sock
->
errors
[
AFD_POLL_BIT_HUP
]
))
errors
[
FD_CLOSE_BIT
]
=
sock
->
errors
[
AFD_POLL_BIT_RESET
]
;
errors
[
FD_READ_BIT
]
=
sock
_get_error
(
sock
->
errors
[
AFD_POLL_BIT_READ
]
)
;
errors
[
FD_WRITE_BIT
]
=
sock
_get_error
(
sock
->
errors
[
AFD_POLL_BIT_WRITE
]
)
;
errors
[
FD_OOB_BIT
]
=
sock
_get_error
(
sock
->
errors
[
AFD_POLL_BIT_OOB
]
)
;
errors
[
FD_ACCEPT_BIT
]
=
sock
_get_error
(
sock
->
errors
[
AFD_POLL_BIT_ACCEPT
]
)
;
errors
[
FD_CONNECT_BIT
]
=
sock
_get_error
(
sock
->
errors
[
AFD_POLL_BIT_CONNECT_ERR
]
)
;
if
(
!
(
errors
[
FD_CLOSE_BIT
]
=
sock
_get_error
(
sock
->
errors
[
AFD_POLL_BIT_HUP
]
)
))
errors
[
FD_CLOSE_BIT
]
=
sock
_get_error
(
sock
->
errors
[
AFD_POLL_BIT_RESET
]
)
;
set_reply_data
(
errors
,
min
(
get_reply_max_size
(),
sizeof
(
errors
)
));
if
(
req
->
service
)
...
...
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