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
1d2d0d56
Commit
1d2d0d56
authored
Dec 30, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Send the version with the initial fd so that it can be checked before…
server: Send the version with the initial fd so that it can be checked before sending the first request.
parent
eb4eda27
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
server.c
dlls/ntdll/server.c
+10
-11
process.c
server/process.c
+1
-1
No files found.
dlls/ntdll/server.c
View file @
1d2d0d56
...
...
@@ -934,7 +934,7 @@ static void send_server_task_port(void)
*/
void
server_init_process
(
void
)
{
obj_handle_t
dummy_handle
;
obj_handle_t
version
;
const
char
*
env_socket
=
getenv
(
"WINESERVERSOCKET"
);
if
(
env_socket
)
...
...
@@ -958,8 +958,15 @@ void server_init_process(void)
pthread_functions
.
sigprocmask
(
SIG_BLOCK
,
&
server_block_set
,
NULL
);
/* receive the first thread request fd on the main socket */
ntdll_get_thread_data
()
->
request_fd
=
receive_fd
(
&
dummy_handle
);
ntdll_get_thread_data
()
->
request_fd
=
receive_fd
(
&
version
);
if
(
version
!=
SERVER_PROTOCOL_VERSION
)
server_protocol_error
(
"version mismatch %d/%d.
\n
"
"Your %s binary was not upgraded correctly,
\n
"
"or you have an older one somewhere in your PATH.
\n
"
"Or maybe the wrong wineserver is still running?
\n
"
,
version
,
SERVER_PROTOCOL_VERSION
,
(
version
>
SERVER_PROTOCOL_VERSION
)
?
"wine"
:
"wineserver"
);
#ifdef __APPLE__
send_server_task_port
();
#endif
...
...
@@ -1004,7 +1011,7 @@ NTSTATUS server_init_process_done(void)
*/
size_t
server_init_thread
(
int
unix_pid
,
int
unix_tid
,
void
*
entry_point
)
{
int
version
,
ret
;
int
ret
;
int
reply_pipe
[
2
];
struct
sigaction
sig_act
;
size_t
info_size
;
...
...
@@ -1049,18 +1056,10 @@ size_t server_init_thread( int unix_pid, int unix_tid, void *entry_point )
NtCurrentTeb
()
->
ClientId
.
UniqueProcess
=
ULongToHandle
(
reply
->
pid
);
NtCurrentTeb
()
->
ClientId
.
UniqueThread
=
ULongToHandle
(
reply
->
tid
);
info_size
=
reply
->
info_size
;
version
=
reply
->
version
;
server_start_time
=
reply
->
server_start
;
}
SERVER_END_REQ
;
if
(
ret
)
server_protocol_error
(
"init_thread failed with status %x
\n
"
,
ret
);
if
(
version
!=
SERVER_PROTOCOL_VERSION
)
server_protocol_error
(
"version mismatch %d/%d.
\n
"
"Your %s binary was not upgraded correctly,
\n
"
"or you have an older one somewhere in your PATH.
\n
"
"Or maybe the wrong wineserver is still running?
\n
"
,
version
,
SERVER_PROTOCOL_VERSION
,
(
version
>
SERVER_PROTOCOL_VERSION
)
?
"wine"
:
"wineserver"
);
return
info_size
;
}
server/process.c
View file @
1d2d0d56
...
...
@@ -377,7 +377,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
file_set_error
();
goto
error
;
}
if
(
send_client_fd
(
process
,
request_pipe
[
1
],
0
)
==
-
1
)
if
(
send_client_fd
(
process
,
request_pipe
[
1
],
SERVER_PROTOCOL_VERSION
)
==
-
1
)
{
close
(
request_pipe
[
0
]
);
close
(
request_pipe
[
1
]
);
...
...
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