qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 2/5] gdbstub: call socket_set_fast_reuse inst


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v4 2/5] gdbstub: call socket_set_fast_reuse instead of setting SO_REUSEADDR
Date: Mon, 16 Sep 2013 08:03:38 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

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 <address@hidden>
> ---
>  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?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]