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
bc30303c
Commit
bc30303c
authored
Dec 09, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Use attributes instead of inherit flag in socket requests.
parent
834385ca
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
18 deletions
+20
-18
socket.c
dlls/winsock/socket.c
+9
-9
server_protocol.h
include/wine/server_protocol.h
+3
-3
protocol.def
server/protocol.def
+2
-2
sock.c
server/sock.c
+4
-2
trace.c
server/trace.c
+2
-2
No files found.
dlls/winsock/socket.c
View file @
bc30303c
...
@@ -1592,9 +1592,9 @@ SOCKET WINAPI WS_accept(SOCKET s, struct WS_sockaddr *addr,
...
@@ -1592,9 +1592,9 @@ SOCKET WINAPI WS_accept(SOCKET s, struct WS_sockaddr *addr,
}
}
SERVER_START_REQ
(
accept_socket
)
SERVER_START_REQ
(
accept_socket
)
{
{
req
->
lhandle
=
SOCKET2HANDLE
(
s
);
req
->
lhandle
=
SOCKET2HANDLE
(
s
);
req
->
access
=
GENERIC_READ
|
GENERIC_WRITE
|
SYNCHRONIZE
;
req
->
access
=
GENERIC_READ
|
GENERIC_WRITE
|
SYNCHRONIZE
;
req
->
inherit
=
TRUE
;
req
->
attributes
=
OBJ_INHERIT
;
set_error
(
wine_server_call
(
req
)
);
set_error
(
wine_server_call
(
req
)
);
as
=
HANDLE2SOCKET
(
reply
->
handle
);
as
=
HANDLE2SOCKET
(
reply
->
handle
);
}
}
...
@@ -3513,12 +3513,12 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
...
@@ -3513,12 +3513,12 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
SERVER_START_REQ
(
create_socket
)
SERVER_START_REQ
(
create_socket
)
{
{
req
->
family
=
af
;
req
->
family
=
af
;
req
->
type
=
type
;
req
->
type
=
type
;
req
->
protocol
=
protocol
;
req
->
protocol
=
protocol
;
req
->
access
=
GENERIC_READ
|
GENERIC_WRITE
|
SYNCHRONIZE
;
req
->
access
=
GENERIC_READ
|
GENERIC_WRITE
|
SYNCHRONIZE
;
req
->
flags
=
dwFlags
;
req
->
attributes
=
OBJ_INHERIT
;
req
->
inherit
=
TRUE
;
req
->
flags
=
dwFlags
;
set_error
(
wine_server_call
(
req
)
);
set_error
(
wine_server_call
(
req
)
);
ret
=
HANDLE2SOCKET
(
reply
->
handle
);
ret
=
HANDLE2SOCKET
(
reply
->
handle
);
}
}
...
...
include/wine/server_protocol.h
View file @
bc30303c
...
@@ -885,7 +885,7 @@ struct create_socket_request
...
@@ -885,7 +885,7 @@ struct create_socket_request
{
{
struct
request_header
__header
;
struct
request_header
__header
;
unsigned
int
access
;
unsigned
int
access
;
int
inherit
;
unsigned
int
attributes
;
int
family
;
int
family
;
int
type
;
int
type
;
int
protocol
;
int
protocol
;
...
@@ -904,7 +904,7 @@ struct accept_socket_request
...
@@ -904,7 +904,7 @@ struct accept_socket_request
struct
request_header
__header
;
struct
request_header
__header
;
obj_handle_t
lhandle
;
obj_handle_t
lhandle
;
unsigned
int
access
;
unsigned
int
access
;
int
inherit
;
unsigned
int
attributes
;
};
};
struct
accept_socket_reply
struct
accept_socket_reply
{
{
...
@@ -4316,6 +4316,6 @@ union generic_reply
...
@@ -4316,6 +4316,6 @@ union generic_reply
struct
query_symlink_reply
query_symlink_reply
;
struct
query_symlink_reply
query_symlink_reply
;
};
};
#define SERVER_PROTOCOL_VERSION 20
7
#define SERVER_PROTOCOL_VERSION 20
8
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
bc30303c
...
@@ -679,7 +679,7 @@ enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
...
@@ -679,7 +679,7 @@ enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
/* Create a socket */
/* Create a socket */
@REQ(create_socket)
@REQ(create_socket)
unsigned int access; /* wanted access rights */
unsigned int access; /* wanted access rights */
int inherit; /* inherit flag
*/
unsigned int attributes; /* object attributes
*/
int family; /* family, see socket manpage */
int family; /* family, see socket manpage */
int type; /* type, see socket manpage */
int type; /* type, see socket manpage */
int protocol; /* protocol, see socket manpage */
int protocol; /* protocol, see socket manpage */
...
@@ -693,7 +693,7 @@ enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
...
@@ -693,7 +693,7 @@ enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
@REQ(accept_socket)
@REQ(accept_socket)
obj_handle_t lhandle; /* handle to the listening socket */
obj_handle_t lhandle; /* handle to the listening socket */
unsigned int access; /* wanted access rights */
unsigned int access; /* wanted access rights */
int inherit; /* inherit flag
*/
unsigned int attributes; /* object attributes
*/
@REPLY
@REPLY
obj_handle_t handle; /* handle to the new socket */
obj_handle_t handle; /* handle to the new socket */
@END
@END
...
...
server/sock.c
View file @
bc30303c
...
@@ -773,7 +773,8 @@ DECL_HANDLER(create_socket)
...
@@ -773,7 +773,8 @@ DECL_HANDLER(create_socket)
reply
->
handle
=
0
;
reply
->
handle
=
0
;
if
((
obj
=
create_socket
(
req
->
family
,
req
->
type
,
req
->
protocol
,
req
->
flags
))
!=
NULL
)
if
((
obj
=
create_socket
(
req
->
family
,
req
->
type
,
req
->
protocol
,
req
->
flags
))
!=
NULL
)
{
{
reply
->
handle
=
alloc_handle
(
current
->
process
,
obj
,
req
->
access
,
req
->
inherit
);
reply
->
handle
=
alloc_handle
(
current
->
process
,
obj
,
req
->
access
,
req
->
attributes
&
OBJ_INHERIT
);
release_object
(
obj
);
release_object
(
obj
);
}
}
}
}
...
@@ -786,7 +787,8 @@ DECL_HANDLER(accept_socket)
...
@@ -786,7 +787,8 @@ DECL_HANDLER(accept_socket)
reply
->
handle
=
0
;
reply
->
handle
=
0
;
if
((
sock
=
accept_socket
(
req
->
lhandle
))
!=
NULL
)
if
((
sock
=
accept_socket
(
req
->
lhandle
))
!=
NULL
)
{
{
reply
->
handle
=
alloc_handle
(
current
->
process
,
&
sock
->
obj
,
req
->
access
,
req
->
inherit
);
reply
->
handle
=
alloc_handle
(
current
->
process
,
&
sock
->
obj
,
req
->
access
,
req
->
attributes
&
OBJ_INHERIT
);
sock
->
wparam
=
reply
->
handle
;
/* wparam for message is the socket handle */
sock
->
wparam
=
reply
->
handle
;
/* wparam for message is the socket handle */
sock_reselect
(
sock
);
sock_reselect
(
sock
);
release_object
(
&
sock
->
obj
);
release_object
(
&
sock
->
obj
);
...
...
server/trace.c
View file @
bc30303c
...
@@ -1103,7 +1103,7 @@ static void dump_unmount_device_request( const struct unmount_device_request *re
...
@@ -1103,7 +1103,7 @@ static void dump_unmount_device_request( const struct unmount_device_request *re
static
void
dump_create_socket_request
(
const
struct
create_socket_request
*
req
)
static
void
dump_create_socket_request
(
const
struct
create_socket_request
*
req
)
{
{
fprintf
(
stderr
,
" access=%08x,"
,
req
->
access
);
fprintf
(
stderr
,
" access=%08x,"
,
req
->
access
);
fprintf
(
stderr
,
"
inherit=%d,"
,
req
->
inherit
);
fprintf
(
stderr
,
"
attributes=%08x,"
,
req
->
attributes
);
fprintf
(
stderr
,
" family=%d,"
,
req
->
family
);
fprintf
(
stderr
,
" family=%d,"
,
req
->
family
);
fprintf
(
stderr
,
" type=%d,"
,
req
->
type
);
fprintf
(
stderr
,
" type=%d,"
,
req
->
type
);
fprintf
(
stderr
,
" protocol=%d,"
,
req
->
protocol
);
fprintf
(
stderr
,
" protocol=%d,"
,
req
->
protocol
);
...
@@ -1119,7 +1119,7 @@ static void dump_accept_socket_request( const struct accept_socket_request *req
...
@@ -1119,7 +1119,7 @@ static void dump_accept_socket_request( const struct accept_socket_request *req
{
{
fprintf
(
stderr
,
" lhandle=%p,"
,
req
->
lhandle
);
fprintf
(
stderr
,
" lhandle=%p,"
,
req
->
lhandle
);
fprintf
(
stderr
,
" access=%08x,"
,
req
->
access
);
fprintf
(
stderr
,
" access=%08x,"
,
req
->
access
);
fprintf
(
stderr
,
"
inherit=%d"
,
req
->
inherit
);
fprintf
(
stderr
,
"
attributes=%08x"
,
req
->
attributes
);
}
}
static
void
dump_accept_socket_reply
(
const
struct
accept_socket_reply
*
req
)
static
void
dump_accept_socket_reply
(
const
struct
accept_socket_reply
*
req
)
...
...
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