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
5eca3afa
Commit
5eca3afa
authored
Mar 14, 1999
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not call ExitThread() on server communication errors.
parent
c2795b73
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
client.c
scheduler/client.c
+15
-4
No files found.
scheduler/client.c
View file @
5eca3afa
...
@@ -28,6 +28,17 @@
...
@@ -28,6 +28,17 @@
/***********************************************************************
/***********************************************************************
* CLIENT_Die
*
* Die on protocol errors or socket close
*/
static
void
CLIENT_Die
(
THDB
*
thdb
)
{
close
(
thdb
->
socket
);
SYSDEPS_ExitThread
();
}
/***********************************************************************
* CLIENT_ProtocolError
* CLIENT_ProtocolError
*/
*/
static
void
CLIENT_ProtocolError
(
const
char
*
err
,
...
)
static
void
CLIENT_ProtocolError
(
const
char
*
err
,
...
)
...
@@ -39,7 +50,7 @@ static void CLIENT_ProtocolError( const char *err, ... )
...
@@ -39,7 +50,7 @@ static void CLIENT_ProtocolError( const char *err, ... )
fprintf
(
stderr
,
"Client protocol error:%p: "
,
thdb
->
server_tid
);
fprintf
(
stderr
,
"Client protocol error:%p: "
,
thdb
->
server_tid
);
vfprintf
(
stderr
,
err
,
args
);
vfprintf
(
stderr
,
err
,
args
);
va_end
(
args
);
va_end
(
args
);
ExitThread
(
1
);
CLIENT_Die
(
thdb
);
}
}
...
@@ -145,7 +156,7 @@ static unsigned int CLIENT_WaitReply_v( int *len, int *passed_fd,
...
@@ -145,7 +156,7 @@ static unsigned int CLIENT_WaitReply_v( int *len, int *passed_fd,
perror
(
"recvmsg"
);
perror
(
"recvmsg"
);
CLIENT_ProtocolError
(
"recvmsg
\n
"
);
CLIENT_ProtocolError
(
"recvmsg
\n
"
);
}
}
if
(
!
ret
)
ExitThread
(
1
);
/* the server closed the connection; time to die... */
if
(
!
ret
)
CLIENT_Die
(
thdb
);
/* the server closed the connection; time to die... */
/* sanity checks */
/* sanity checks */
...
@@ -189,7 +200,7 @@ static unsigned int CLIENT_WaitReply_v( int *len, int *passed_fd,
...
@@ -189,7 +200,7 @@ static unsigned int CLIENT_WaitReply_v( int *len, int *passed_fd,
perror
(
"recv"
);
perror
(
"recv"
);
CLIENT_ProtocolError
(
"recv
\n
"
);
CLIENT_ProtocolError
(
"recv
\n
"
);
}
}
if
(
!
addlen
)
ExitThread
(
1
);
/* the server closed the connection; time to die... */
if
(
!
addlen
)
CLIENT_Die
(
thdb
);
/* the server closed the connection; time to die... */
if
(
len
)
*
len
+=
addlen
;
if
(
len
)
*
len
+=
addlen
;
remaining
-=
addlen
;
remaining
-=
addlen
;
}
}
...
@@ -206,7 +217,7 @@ static unsigned int CLIENT_WaitReply_v( int *len, int *passed_fd,
...
@@ -206,7 +217,7 @@ static unsigned int CLIENT_WaitReply_v( int *len, int *passed_fd,
perror
(
"recv"
);
perror
(
"recv"
);
CLIENT_ProtocolError
(
"recv
\n
"
);
CLIENT_ProtocolError
(
"recv
\n
"
);
}
}
if
(
!
addlen
)
ExitThread
(
1
);
/* the server closed the connection; time to die... */
if
(
!
addlen
)
CLIENT_Die
(
thdb
);
/* the server closed the connection; time to die... */
remaining
-=
addlen
;
remaining
-=
addlen
;
}
}
...
...
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