check shut_rd/shut_wr for read/write.

This commit is contained in:
Kelvin Sherlock 2012-05-13 19:45:51 -04:00
parent b2e2a84b93
commit 6ab3356fc2
2 changed files with 5 additions and 0 deletions

View File

@ -50,6 +50,8 @@ static int sock_read(
Word terr;
rrBuff rr;
if (e->_SHUT_RD)
return 0;
if (e->_TYPE == SOCK_DGRAM)
{

View File

@ -25,6 +25,7 @@ int mwrite(Entry *e, void *p1, void *p2, void *p3, void *p4, void *p5)
*outbytes = 0;
if (Debug > 0)
{
s16_debug_printf("write nbytes = %ld", nbytes);
@ -39,6 +40,8 @@ int mwrite(Entry *e, void *p1, void *p2, void *p3, void *p4, void *p5)
s16_debug_puts("");
s16_debug_dump(buffer, (Word)nbytes);
}
if (e->_SHUT_WR) return EPIPE;
if (e->_TYPE == SOCK_DGRAM)
{