Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
125
Issues
125
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
111d5610
Commit
111d5610
authored
Jul 04, 2016
by
Martin Clochard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git+ssh://scm.gforge.inria.fr//gitroot/why3/why3
parents
0f5afce8
d0a05a2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
3 deletions
+25
-3
src/server/server-win.c
src/server/server-win.c
+25
-3
No files found.
src/server/server-win.c
View file @
111d5610
...
...
@@ -427,6 +427,7 @@ void run_request (prequest r) {
proc
->
outfile
=
outfile
;
key
=
keygen
();
list_append
(
processes
,
key
,
(
void
*
)
proc
);
send_started_msg_to_client
(
client
,
r
->
id
);
portassoc
.
CompletionKey
=
(
void
*
)
to_ms_key
(
key
,
PROCESS
);
portassoc
.
CompletionPort
=
completion_port
;
if
(
!
SetInformationJobObject
...
...
@@ -489,6 +490,27 @@ void free_process(pproc proc) {
free
(
proc
);
}
void
send_started_msg_to_client
(
pclient
client
,
char
*
id
)
{
char
*
msgbuf
;
size_t
len
=
0
;
int
used
;
//len of id + S + semicolon + \n + \0
len
+=
strlen
(
id
)
+
4
;
msgbuf
=
(
char
*
)
malloc
(
sizeof
(
char
)
*
len
);
if
(
msgbuf
==
NULL
)
{
shutdown_with_msg
(
"error when allocating client msg"
);
}
used
=
snprintf
(
msgbuf
,
len
,
"S;%s
\n
"
,
id
);
if
(
used
!=
len
-
1
)
{
shutdown_with_msg
(
"message for client too long"
);
}
queue_write
(
client
,
msgbuf
);
}
void
send_msg_to_client
(
pclient
client
,
char
*
id
,
DWORD
exitcode
,
...
...
@@ -498,8 +520,8 @@ void send_msg_to_client(pclient client,
char
*
msgbuf
;
int
len
=
0
;
int
used
;
//len of id + semicolon
len
+=
strlen
(
id
)
+
1
;
//len of id +
F + 2
semicolon
len
+=
strlen
(
id
)
+
3
;
// we assume a length of at most 9 for both exitcode and time, plus one for
// the timeout boolean, plus three semicolons, makes 23 chars
len
+=
23
;
...
...
@@ -509,7 +531,7 @@ void send_msg_to_client(pclient client,
if
(
msgbuf
==
NULL
)
{
shutdown_with_msg
(
"error when allocating buffer for client msg"
);
}
used
=
snprintf
(
msgbuf
,
len
,
"%s;%lu;%.2f;%d;%s
\n
"
,
used
=
snprintf
(
msgbuf
,
len
,
"
F;
%s;%lu;%.2f;%d;%s
\n
"
,
id
,
exitcode
,
cpu_time
,
(
timeout
?
1
:
0
),
outfile
);
if
(
used
>=
len
)
{
shutdown_with_msg
(
"message for client too long"
);
...
...
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