Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/posix/sys/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ int socketpair(int domain, int type, int protocol,
enum
{
SHUT_RD = 0,
SHUT_RW,
SHUT_RDRW
SHUT_WR,
SHUT_RDWR
};

#define INVALID_SOCKET ((SOCKET)(~0))
Expand Down
8 changes: 4 additions & 4 deletions src/posix/tcp_fd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ ssize_t TCP_FD_Conn::send(const void* data, size_t len, int)
len,
[&written] (bool) { written = true; }
);

// sometimes we can just write and forget
if (written) return len;
while (!written) {
Expand Down Expand Up @@ -305,14 +305,14 @@ int TCP_FD_Conn::shutdown(int mode)
return -1;
}
switch (mode) {
case SHUT_RDRW:
case SHUT_RDWR:
conn->close();
return 0;
case SHUT_RD:
printf("Ignoring shutdown(SHUT_RD)\n");
return 0;
case SHUT_RW:
printf("Ignoring shutdown(SHUT_RW)\n");
case SHUT_WR:
printf("Ignoring shutdown(SHUT_WR)\n");
return 0;
default:
errno = EINVAL;
Expand Down