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
c2b089aa
Commit
c2b089aa
authored
Sep 24, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Sep 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Move sock_ioctl() down to avoid forward declarations.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c6806e3f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
41 deletions
+40
-41
sock.c
server/sock.c
+40
-41
No files found.
server/sock.c
View file @
c2b089aa
...
...
@@ -134,7 +134,6 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async );
static
void
sock_queue_async
(
struct
fd
*
fd
,
struct
async
*
async
,
int
type
,
int
count
);
static
void
sock_reselect_async
(
struct
fd
*
fd
,
struct
async_queue
*
queue
);
static
int
init_socket
(
struct
sock
*
sock
,
int
family
,
int
type
,
int
protocol
,
unsigned
int
flags
);
static
int
sock_get_ntstatus
(
int
err
);
static
unsigned
int
sock_get_error
(
int
err
);
...
...
@@ -539,46 +538,6 @@ static enum server_fd_type sock_get_fd_type( struct fd *fd )
return
FD_TYPE_SOCKET
;
}
static
int
sock_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
)
{
struct
sock
*
sock
=
get_fd_user
(
fd
);
assert
(
sock
->
obj
.
ops
==
&
sock_ops
);
if
(
get_unix_fd
(
fd
)
==
-
1
&&
code
!=
IOCTL_AFD_CREATE
)
return
0
;
switch
(
code
)
{
case
IOCTL_AFD_CREATE
:
{
const
struct
afd_create_params
*
params
=
get_req_data
();
if
(
get_req_data_size
()
!=
sizeof
(
*
params
))
{
set_error
(
STATUS_INVALID_PARAMETER
);
return
0
;
}
init_socket
(
sock
,
params
->
family
,
params
->
type
,
params
->
protocol
,
params
->
flags
);
return
0
;
}
case
IOCTL_AFD_ADDRESS_LIST_CHANGE
:
if
((
sock
->
state
&
FD_WINE_NONBLOCKING
)
&&
async_is_blocking
(
async
))
{
set_win32_error
(
WSAEWOULDBLOCK
);
return
0
;
}
if
(
!
sock_get_ifchange
(
sock
))
return
0
;
queue_async
(
&
sock
->
ifchange_q
,
async
);
set_error
(
STATUS_PENDING
);
return
1
;
default:
set_error
(
STATUS_NOT_SUPPORTED
);
return
0
;
}
}
static
void
sock_queue_async
(
struct
fd
*
fd
,
struct
async
*
async
,
int
type
,
int
count
)
{
struct
sock
*
sock
=
get_fd_user
(
fd
);
...
...
@@ -958,6 +917,46 @@ static int sock_get_ntstatus( int err )
}
}
static
int
sock_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
)
{
struct
sock
*
sock
=
get_fd_user
(
fd
);
assert
(
sock
->
obj
.
ops
==
&
sock_ops
);
if
(
get_unix_fd
(
fd
)
==
-
1
&&
code
!=
IOCTL_AFD_CREATE
)
return
0
;
switch
(
code
)
{
case
IOCTL_AFD_CREATE
:
{
const
struct
afd_create_params
*
params
=
get_req_data
();
if
(
get_req_data_size
()
!=
sizeof
(
*
params
))
{
set_error
(
STATUS_INVALID_PARAMETER
);
return
0
;
}
init_socket
(
sock
,
params
->
family
,
params
->
type
,
params
->
protocol
,
params
->
flags
);
return
0
;
}
case
IOCTL_AFD_ADDRESS_LIST_CHANGE
:
if
((
sock
->
state
&
FD_WINE_NONBLOCKING
)
&&
async_is_blocking
(
async
))
{
set_win32_error
(
WSAEWOULDBLOCK
);
return
0
;
}
if
(
!
sock_get_ifchange
(
sock
))
return
0
;
queue_async
(
&
sock
->
ifchange_q
,
async
);
set_error
(
STATUS_PENDING
);
return
1
;
default:
set_error
(
STATUS_NOT_SUPPORTED
);
return
0
;
}
}
#ifdef HAVE_LINUX_RTNETLINK_H
/* only keep one ifchange object around, all sockets waiting for wakeups will look to it */
...
...
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