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:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user