[spice-server,1/2] test-websocket: Some Windows compatibility

Submitted by Frediano Ziglio on July 17, 2019, 9:48 a.m.

Details

Message ID 20190717094851.14923-1-fziglio@redhat.com
State Accepted
Commit 5f62d03073514dc857f452f16c88bf9aa2c546b9
Headers show
Series "Series without cover letter" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio July 17, 2019, 9:48 a.m.
Don't call close but socket_close.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
 server/tests/test-websocket.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Currently the executable cannot run on Windows but it does not hurt
to make the source more compatible with that system.

Patch hide | download patch | download mbox

diff --git a/server/tests/test-websocket.c b/server/tests/test-websocket.c
index dc7b7d342..e74cb5497 100644
--- a/server/tests/test-websocket.c
+++ b/server/tests/test-websocket.c
@@ -193,10 +193,10 @@  main(int argc, char **argv)
         ++num_connections;
         handle_client(new_sock);
 
-        close(new_sock);
+        socket_close(new_sock);
     }
 
-    close(sock);
+    socket_close(sock);
     printf("handled %u connections\n", num_connections);
     return 0;
 }

Comments

ping the series

> 
> Don't call close but socket_close.
> 
> Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
> ---
>  server/tests/test-websocket.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Currently the executable cannot run on Windows but it does not hurt
> to make the source more compatible with that system.
> 
> diff --git a/server/tests/test-websocket.c b/server/tests/test-websocket.c
> index dc7b7d342..e74cb5497 100644
> --- a/server/tests/test-websocket.c
> +++ b/server/tests/test-websocket.c
> @@ -193,10 +193,10 @@ main(int argc, char **argv)
>          ++num_connections;
>          handle_client(new_sock);
>  
> -        close(new_sock);
> +        socket_close(new_sock);
>      }
>  
> -    close(sock);
> +    socket_close(sock);
>      printf("handled %u connections\n", num_connections);
>      return 0;
>  }
ping

> ping the series
> 
> > 
> > Don't call close but socket_close.
> > 
> > Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
> > ---
> >  server/tests/test-websocket.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > Currently the executable cannot run on Windows but it does not hurt
> > to make the source more compatible with that system.
> > 
> > diff --git a/server/tests/test-websocket.c b/server/tests/test-websocket.c
> > index dc7b7d342..e74cb5497 100644
> > --- a/server/tests/test-websocket.c
> > +++ b/server/tests/test-websocket.c
> > @@ -193,10 +193,10 @@ main(int argc, char **argv)
> >          ++num_connections;
> >          handle_client(new_sock);
> >  
> > -        close(new_sock);
> > +        socket_close(new_sock);
> >      }
> >  
> > -    close(sock);
> > +    socket_close(sock);
> >      printf("handled %u connections\n", num_connections);
> >      return 0;
> >  }
On 8/5/19 4:52 PM, Frediano Ziglio wrote:
> ping
> 
>> ping the series

Ack for both patches.

Uri.

>>
>>>
>>> Don't call close but socket_close.
>>>
>>> Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
>>> ---
>>>   server/tests/test-websocket.c | 4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> Currently the executable cannot run on Windows but it does not hurt
>>> to make the source more compatible with that system.
>>>
>>> diff --git a/server/tests/test-websocket.c b/server/tests/test-websocket.c
>>> index dc7b7d342..e74cb5497 100644
>>> --- a/server/tests/test-websocket.c
>>> +++ b/server/tests/test-websocket.c
>>> @@ -193,10 +193,10 @@ main(int argc, char **argv)
>>>           ++num_connections;
>>>           handle_client(new_sock);
>>>   
>>> -        close(new_sock);
>>> +        socket_close(new_sock);
>>>       }
>>>   
>>> -    close(sock);
>>> +    socket_close(sock);
>>>       printf("handled %u connections\n", num_connections);
>>>       return 0;
>>>   }
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
>