Fix a cvs server bug introduced in 1.11.2, in the words of the author:

---
Fix communication hanging in communication shutdown phase, caused by at
least older CVS clients (version < 1.11.2) and a semantically incorrect
usage of getc() by the server.
---

getc() was being used on a blocking socket/pipe.

Submitted by:   rse
This commit is contained in:
Peter Wemm 2002-09-02 07:58:04 +00:00
parent 67bdda9718
commit e9c371a38d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=102852

View File

@ -1,5 +1,7 @@
/* Code for the buffer data structure. */
/* $FreeBSD$ */
#include <assert.h>
#include "cvs.h"
#include "buffer.h"
@ -1378,8 +1380,7 @@ stdio_buffer_shutdown (buf)
if (buf->input)
{
if (! buf_empty_p (buf)
|| getc (bc->fp) != EOF)
if (! buf_empty_p (buf))
{
# ifdef SERVER_SUPPORT
if (server_active)