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
5fb54566
Commit
5fb54566
authored
Mar 08, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added server protocol version check.
parent
c3bcd6ce
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
1 deletion
+15
-1
server.h
include/server.h
+3
-0
client.c
scheduler/client.c
+6
-0
thread.c
server/thread.c
+1
-0
trace.c
server/trace.c
+2
-1
make_requests
tools/make_requests
+3
-0
No files found.
include/server.h
View file @
5fb54566
...
...
@@ -188,6 +188,7 @@ struct get_thread_buffer_request
OUT
void
*
pid
;
/* process id of the new thread's process */
OUT
void
*
tid
;
/* thread id of the new thread */
OUT
int
boot
;
/* is this the boot thread? */
OUT
int
version
;
/* protocol version */
};
...
...
@@ -1185,6 +1186,8 @@ enum request
REQ_NB_REQUESTS
};
#define SERVER_PROTOCOL_VERSION 1
/* ### make_requests end ### */
/* Everything above this line is generated automatically by tools/make_requests */
...
...
scheduler/client.c
View file @
5fb54566
...
...
@@ -467,6 +467,12 @@ int CLIENT_InitThread(void)
first_req
=
teb
->
buffer
;
teb
->
process
->
server_pid
=
first_req
->
pid
;
teb
->
tid
=
first_req
->
tid
;
if
(
first_req
->
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
"
,
first_req
->
version
,
SERVER_PROTOCOL_VERSION
,
(
first_req
->
version
>
SERVER_PROTOCOL_VERSION
)
?
"wine"
:
"wineserver"
);
if
(
first_req
->
boot
)
boot_thread_id
=
teb
->
tid
;
else
if
(
boot_thread_id
==
teb
->
tid
)
boot_thread_id
=
0
;
...
...
server/thread.c
View file @
5fb54566
...
...
@@ -104,6 +104,7 @@ static int alloc_client_buffer( struct thread *thread )
req
->
pid
=
get_process_id
(
thread
->
process
);
req
->
tid
=
get_thread_id
(
thread
);
req
->
boot
=
(
thread
==
booting_thread
);
req
->
version
=
SERVER_PROTOCOL_VERSION
;
set_reply_fd
(
thread
,
fd
);
send_reply
(
thread
);
return
1
;
...
...
server/trace.c
View file @
5fb54566
...
...
@@ -282,7 +282,8 @@ static void dump_get_thread_buffer_reply( const struct get_thread_buffer_request
{
fprintf
(
stderr
,
" pid=%p,"
,
req
->
pid
);
fprintf
(
stderr
,
" tid=%p,"
,
req
->
tid
);
fprintf
(
stderr
,
" boot=%d"
,
req
->
boot
);
fprintf
(
stderr
,
" boot=%d,"
,
req
->
boot
);
fprintf
(
stderr
,
" version=%d"
,
req
->
version
);
}
static
void
dump_terminate_process_request
(
const
struct
terminate_process_request
*
req
)
...
...
tools/make_requests
View file @
5fb54566
...
...
@@ -30,10 +30,12 @@ open(SERVER,"include/server.h") or die "Can't open include/server.h";
### Parse server.h to find request/reply structure definitions
my
@trace_lines
=
();
my
$protocol
=
0
;
# server protocol version
while
(
<
SERVER
>
)
{
if
(
/^struct +(\w+)_request/
)
{
&
DO_REQUEST
(
$1
);
}
if
(
/^\#define SERVER_PROTOCOL_VERSION (\d+)/
)
{
$protocol
=
$1
+
1
;
}
}
### Output the dumping function tables
...
...
@@ -68,6 +70,7 @@ my @server_lines = ();
push
@server_lines
,
"enum request\n{\n"
;
foreach
$req
(
@requests
)
{
push
@server_lines
,
" REQ_\U$req,\n"
;
}
push
@server_lines
,
" REQ_NB_REQUESTS\n};\n"
;
push
@server_lines
,
"\n#define SERVER_PROTOCOL_VERSION $protocol\n"
;
REPLACE_IN_FILE
(
"include/server.h"
,
@server_lines
);
...
...
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