base,dev: Simplify the ListenSocket::accept method.

Remove the nodelay option which is always set to the same thing, and
simplify the logic of the method itself.

Change-Id: I78cd91f99cbaec9abddedbc7dcddc563daedb81f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69158
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
This commit is contained in:
Gabe Black
2023-03-18 06:28:16 -07:00
committed by Gabe Black
parent 79cfef2650
commit 2e1d24d048
6 changed files with 12 additions and 12 deletions

View File

@@ -280,7 +280,7 @@ TapListener::accept()
if (!listener.islistening())
panic("TapListener(accept): cannot accept if we're not listening!");
int sfd = listener.accept(true);
int sfd = listener.accept();
if (sfd != -1)
tap->attach(sfd);
}

View File

@@ -195,7 +195,7 @@ Terminal::accept()
if (!listener.islistening())
panic("%s: cannot accept a connection if not listening!", name());
int fd = listener.accept(true);
int fd = listener.accept();
if (data_fd != -1) {
char message[] = "terminal already attached!\n";
atomic_write(fd, message, sizeof(message));