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
b121f27b
Commit
b121f27b
authored
May 06, 2014
by
Erich E. Hoover
Committed by
Alexandre Julliard
Feb 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Add blocked support for SIO_ADDRESS_LIST_CHANGE ioctl().
parent
315de61b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
19 deletions
+34
-19
event.c
server/event.c
+13
-0
named_pipe.c
server/named_pipe.c
+0
-13
object.h
server/object.h
+1
-0
sock.c
server/sock.c
+20
-6
No files found.
server/event.c
View file @
b121f27b
...
...
@@ -124,6 +124,19 @@ struct event *create_event( struct directory *root, const struct unicode_str *na
return
event
;
}
obj_handle_t
alloc_wait_event
(
struct
process
*
process
)
{
obj_handle_t
handle
=
0
;
struct
event
*
event
=
create_event
(
NULL
,
NULL
,
0
,
1
,
0
,
NULL
);
if
(
event
)
{
handle
=
alloc_handle
(
process
,
event
,
EVENT_ALL_ACCESS
,
0
);
release_object
(
event
);
}
return
handle
;
}
struct
event
*
get_event_obj
(
struct
process
*
process
,
obj_handle_t
handle
,
unsigned
int
access
)
{
return
(
struct
event
*
)
get_handle_obj
(
process
,
handle
,
access
,
&
event_ops
);
...
...
server/named_pipe.c
View file @
b121f27b
...
...
@@ -590,19 +590,6 @@ static enum server_fd_type pipe_client_get_fd_type( struct fd *fd )
return
FD_TYPE_PIPE
;
}
static
obj_handle_t
alloc_wait_event
(
struct
process
*
process
)
{
obj_handle_t
handle
=
0
;
struct
event
*
event
=
create_event
(
NULL
,
NULL
,
0
,
1
,
0
,
NULL
);
if
(
event
)
{
handle
=
alloc_handle
(
process
,
event
,
EVENT_ALL_ACCESS
,
0
);
release_object
(
event
);
}
return
handle
;
}
static
obj_handle_t
pipe_server_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
const
async_data_t
*
async_data
,
int
blocking
,
const
void
*
data
,
data_size_t
size
)
{
...
...
server/object.h
View file @
b121f27b
...
...
@@ -161,6 +161,7 @@ extern struct event *create_event( struct directory *root, const struct unicode_
const
struct
security_descriptor
*
sd
);
extern
struct
keyed_event
*
create_keyed_event
(
struct
directory
*
root
,
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
const
struct
security_descriptor
*
sd
);
extern
obj_handle_t
alloc_wait_event
(
struct
process
*
process
);
extern
struct
event
*
get_event_obj
(
struct
process
*
process
,
obj_handle_t
handle
,
unsigned
int
access
);
extern
struct
keyed_event
*
get_keyed_event_obj
(
struct
process
*
process
,
obj_handle_t
handle
,
unsigned
int
access
);
extern
void
pulse_event
(
struct
event
*
event
);
...
...
server/sock.c
View file @
b121f27b
...
...
@@ -116,7 +116,7 @@ struct sock
};
static
void
sock_dump
(
struct
object
*
obj
,
int
verbose
);
static
void
sock_add_ifchange
(
struct
sock
*
sock
,
const
async_data_t
*
async_data
);
static
int
sock_add_ifchange
(
struct
sock
*
sock
,
const
async_data_t
*
async_data
);
static
int
sock_signaled
(
struct
object
*
obj
,
struct
wait_queue_entry
*
entry
);
static
struct
fd
*
sock_get_fd
(
struct
object
*
obj
);
static
void
sock_destroy
(
struct
object
*
obj
);
...
...
@@ -534,14 +534,27 @@ obj_handle_t sock_ioctl( struct fd *fd, ioctl_code_t code, const async_data_t *a
int
blocking
,
const
void
*
data
,
data_size_t
size
)
{
struct
sock
*
sock
=
get_fd_user
(
fd
);
obj_handle_t
wait_handle
=
0
;
async_data_t
new_data
;
assert
(
sock
->
obj
.
ops
==
&
sock_ops
);
switch
(
code
)
{
case
WS_SIO_ADDRESS_LIST_CHANGE
:
sock_add_ifchange
(
sock
,
async_data
);
return
0
;
if
(
blocking
)
{
if
(
!
(
wait_handle
=
alloc_wait_event
(
current
->
process
)))
return
0
;
new_data
=
*
async_data
;
new_data
.
event
=
wait_handle
;
async_data
=
&
new_data
;
}
if
(
!
sock_add_ifchange
(
sock
,
async_data
)
&&
wait_handle
)
{
close_handle
(
current
->
process
,
wait_handle
);
return
0
;
}
return
wait_handle
;
default:
set_error
(
STATUS_NOT_SUPPORTED
);
return
0
;
...
...
@@ -944,13 +957,13 @@ static void sock_set_error(void)
}
/* add interface change notification to a socket */
static
void
sock_add_ifchange
(
struct
sock
*
sock
,
const
async_data_t
*
async_data
)
static
int
sock_add_ifchange
(
struct
sock
*
sock
,
const
async_data_t
*
async_data
)
{
struct
async_queue
*
ifchange_q
;
struct
async
*
async
;
if
(
!
(
ifchange_q
=
sock_get_ifchange_q
(
sock
)))
return
;
return
0
;
if
(
!
(
async
=
create_async
(
current
,
ifchange_q
,
async_data
)))
{
...
...
@@ -958,11 +971,12 @@ static void sock_add_ifchange( struct sock *sock, const async_data_t *async_data
sock_destroy_ifchange_q
(
sock
);
set_error
(
STATUS_NO_MEMORY
);
return
;
return
0
;
}
release_object
(
async
);
set_error
(
STATUS_PENDING
);
return
1
;
}
/* stub ifchange object */
...
...
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