mirror of
https://github.com/ksherlock/marignotti.git
synced 2024-12-11 17:51:04 +00:00
check shut_rd/shut_wr for read/write.
This commit is contained in:
parent
b2e2a84b93
commit
6ab3356fc2
2
mread.c
2
mread.c
@ -50,6 +50,8 @@ static int sock_read(
|
|||||||
Word terr;
|
Word terr;
|
||||||
rrBuff rr;
|
rrBuff rr;
|
||||||
|
|
||||||
|
if (e->_SHUT_RD)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (e->_TYPE == SOCK_DGRAM)
|
if (e->_TYPE == SOCK_DGRAM)
|
||||||
{
|
{
|
||||||
|
3
mwrite.c
3
mwrite.c
@ -25,6 +25,7 @@ int mwrite(Entry *e, void *p1, void *p2, void *p3, void *p4, void *p5)
|
|||||||
|
|
||||||
*outbytes = 0;
|
*outbytes = 0;
|
||||||
|
|
||||||
|
|
||||||
if (Debug > 0)
|
if (Debug > 0)
|
||||||
{
|
{
|
||||||
s16_debug_printf("write nbytes = %ld", nbytes);
|
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_puts("");
|
||||||
s16_debug_dump(buffer, (Word)nbytes);
|
s16_debug_dump(buffer, (Word)nbytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (e->_SHUT_WR) return EPIPE;
|
||||||
|
|
||||||
if (e->_TYPE == SOCK_DGRAM)
|
if (e->_TYPE == SOCK_DGRAM)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user