tcp: fix build breakage caused by hrev49265.
There's currently a debate on the ML as to whether this should be '== 0' or '!= 0', though.
This commit is contained in:
@@ -741,7 +741,7 @@ TCPEndpoint::Listen(int count)
|
|||||||
fAcceptSemaphore = create_sem(0, "tcp accept");
|
fAcceptSemaphore = create_sem(0, "tcp accept");
|
||||||
if (fAcceptSemaphore < B_OK)
|
if (fAcceptSemaphore < B_OK)
|
||||||
return ENOBUFS;
|
return ENOBUFS;
|
||||||
|
|
||||||
status_t status = fManager->SetPassive(this);
|
status_t status = fManager->SetPassive(this);
|
||||||
if (status != B_OK) {
|
if (status != B_OK) {
|
||||||
delete_sem(fAcceptSemaphore);
|
delete_sem(fAcceptSemaphore);
|
||||||
@@ -796,7 +796,7 @@ TCPEndpoint::SendData(net_buffer *buffer)
|
|||||||
return EDESTADDRREQ;
|
return EDESTADDRREQ;
|
||||||
if (!is_writable(fState) && !is_establishing(fState)) {
|
if (!is_writable(fState) && !is_establishing(fState)) {
|
||||||
// we only send signals when called from userland
|
// we only send signals when called from userland
|
||||||
if (gStackModule->is_syscall() && (flags & MSG_NOSIGNAL != 0))
|
if (gStackModule->is_syscall() && ((flags & MSG_NOSIGNAL) != 0))
|
||||||
send_signal(find_thread(NULL), SIGPIPE);
|
send_signal(find_thread(NULL), SIGPIPE);
|
||||||
return EPIPE;
|
return EPIPE;
|
||||||
}
|
}
|
||||||
@@ -1589,7 +1589,7 @@ TCPEndpoint::_Receive(tcp_segment_header& segment, net_buffer* buffer)
|
|||||||
// buffer?
|
// buffer?
|
||||||
fReceiveWindow = max_c(fReceiveQueue.Free(), fReceiveWindow);
|
fReceiveWindow = max_c(fReceiveQueue.Free(), fReceiveWindow);
|
||||||
// the window must not shrink
|
// the window must not shrink
|
||||||
|
|
||||||
// trim buffer to be within the receive window
|
// trim buffer to be within the receive window
|
||||||
int32 drop = (int32)(fReceiveNext - segment.sequence).Number();
|
int32 drop = (int32)(fReceiveNext - segment.sequence).Number();
|
||||||
if (drop > 0) {
|
if (drop > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user