From: Thomas Huth <thuth@redhat.com>
To: Mark Pizzolato <Mark@infocomm.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "jan.kiszka@siemens.com" <jan.kiszka@siemens.com>,
"sw@weilnetz.de" <sw@weilnetz.de>
Subject: Re: [Qemu-devel] [PATCH 1/5] slirp: closesocket must be called to close sockets on windows
Date: Tue, 27 Oct 2015 15:28:28 +0100 [thread overview]
Message-ID: <562F8A0C.8070607@redhat.com> (raw)
In-Reply-To: <03006E3FC39B5A48AB9DBCCC101090A823806F4083@REDROOF2.alohasunset.com>
On 22/10/15 01:15, Mark Pizzolato wrote:
> Signed-off-by: Mark Pizzolato <mark@infocomm.com>
> ---
> slirp/slirp.c | 2 +-
> slirp/socket.c | 3 ++-
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/slirp/slirp.c b/slirp/slirp.c
> index 35f819a..d18faa8 100644
> --- a/slirp/slirp.c
> +++ b/slirp/slirp.c
> @@ -846,7 +846,7 @@ int slirp_remove_hostfwd(Slirp *slirp, int is_udp, struct in_addr host_addr,
> getsockname(so->s, (struct sockaddr *)&addr, &addr_len) == 0 &&
> addr.sin_addr.s_addr == host_addr.s_addr &&
> addr.sin_port == port) {
> - close(so->s);
> + closesocket(so->s);
> sofree(so);
> return 0;
> }
> diff --git a/slirp/socket.c b/slirp/socket.c
> index 37ac5cf..4a20e08 100644
> --- a/slirp/socket.c
> +++ b/slirp/socket.c
> @@ -632,8 +632,9 @@ tcp_listen(Slirp *slirp, uint32_t haddr, u_int hport, uint32_t laddr,
> (listen(s,1) < 0)) {
> int tmperrno = errno; /* Don't clobber the real reason we failed */
>
> - close(s);
> + closesocket(s);
> sofree(so);
> + fprintf (stderr, "Socket Error %d", tmperrno);
Looks like you've left some debugging code in here? I think that should
be removed.
Thomas
next prev parent reply other threads:[~2015-10-27 14:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-21 23:15 [Qemu-devel] [PATCH 1/5] slirp: closesocket must be called to close sockets on windows Mark Pizzolato
2015-10-27 14:28 ` Thomas Huth [this message]
2015-10-27 15:02 ` Mark Pizzolato
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=562F8A0C.8070607@redhat.com \
--to=thuth@redhat.com \
--cc=Mark@infocomm.com \
--cc=jan.kiszka@siemens.com \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).