slirp: Drop link_up checks from if_output and slirp_socket_can_recv

link_up is true once slirp is initialized, so these check are really not
required.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Jan Kiszka 2009-06-24 14:42:30 +02:00 committed by Anthony Liguori
parent f1d99bbdcd
commit b5302e1a9d
2 changed files with 1 additions and 7 deletions

View File

@ -138,10 +138,7 @@ diddit:
/* /*
* This prevents us from malloc()ing too many mbufs * This prevents us from malloc()ing too many mbufs
*/ */
if (link_up) { if_start();
/* if_start will check towrite */
if_start();
}
#endif #endif
} }

View File

@ -824,9 +824,6 @@ size_t slirp_socket_can_recv(struct in_addr guest_addr, int guest_port)
struct iovec iov[2]; struct iovec iov[2];
struct socket *so; struct socket *so;
if (!link_up)
return 0;
so = slirp_find_ctl_socket(guest_addr, guest_port); so = slirp_find_ctl_socket(guest_addr, guest_port);
if (!so || so->so_state & SS_NOFDREF) if (!so || so->so_state & SS_NOFDREF)