From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLZSm-0005gO-Oq for qemu-devel@nongnu.org; Mon, 16 Sep 2013 10:07:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLZSg-0000td-SS for qemu-devel@nongnu.org; Mon, 16 Sep 2013 10:07:40 -0400 Received: from ex-e-1.perimeter.fzi.de ([141.21.8.250]:33655) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLZSg-0000t5-La for qemu-devel@nongnu.org; Mon, 16 Sep 2013 10:07:34 -0400 Message-ID: <523710A4.1090902@fzi.de> Date: Mon, 16 Sep 2013 16:07:32 +0200 From: Sebastian Ottlik MIME-Version: 1.0 References: <1379319907-14950-1-git-send-email-ottlik@fzi.de> <1379319907-14950-3-git-send-email-ottlik@fzi.de> <52370FBA.8020009@redhat.com> In-Reply-To: <52370FBA.8020009@redhat.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 2/5] gdbstub: call socket_set_fast_reuse instead of setting SO_REUSEADDR List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Jan Kiszka , Anthony Liguori , qemu-devel@nongnu.org, Stefan Hajnoczi On 16.09.2013 16:03, Eric Blake wrote: > On 09/16/2013 02:25 AM, Sebastian Ottlik wrote: >> SO_REUSEADDR should be avoided on Windows but is desired on other operating >> systems. So instead of setting it we call socket_set_fast_reuse that will result >> in the appropriate behaviour on all operating systems. >> >> Signed-off-by: Sebastian Ottlik >> --- >> gdbstub.c | 6 ++---- >> 1 file changed, 2 insertions(+), 4 deletions(-) >> >> diff --git a/gdbstub.c b/gdbstub.c >> index 2b7f22b..f43291a 100644 >> --- a/gdbstub.c >> +++ b/gdbstub.c >> @@ -1553,7 +1553,7 @@ static void gdb_accept(void) >> static int gdbserver_open(int port) >> { >> struct sockaddr_in sockaddr; >> - int fd, val, ret; >> + int fd, ret; >> >> fd = socket(PF_INET, SOCK_STREAM, 0); >> if (fd < 0) { >> @@ -1564,9 +1564,7 @@ static int gdbserver_open(int port) >> fcntl(fd, F_SETFD, FD_CLOEXEC); >> #endif >> >> - /* allow fast reuse */ >> - val = 1; >> - qemu_setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); >> + socket_set_fast_reuse(fd, false); > Changed from silent to noisy. Intentional? > Not intentional, I will resubmit this patch set asap.