[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 3/3] Fix address handling in inet_nonblocking
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH v3 3/3] Fix address handling in inet_nonblocking_connect |
Date: |
Thu, 20 Sep 2012 09:03:54 +0300 |
> @@ -526,16 +592,19 @@ int inet_connect(const char *str, Error **errp)
> return sock;
> }
>
> -
> -int inet_nonblocking_connect(const char *str, bool *in_progress,
> - Error **errp)
> +int inet_nonblocking_connect(const char *str, ConnectHandler *callback,
> + void *opaque, bool *in_progress, Error **errp)
> {
Would be nice to have some documentation here.
Something like "on immediate success or immediate
failure, in_progress is set to false, in that case
callback is not invoked".
If you look at it this way, this API is hard to
use right. I'd like to suggest we get rid of
in_progress flag: return -1 on error and
return >=0 and invoke callback on immediate success.
--
MST
- Re: [Qemu-devel] [PATCH v3 1/3] Refactor inet_connect_opts function, (continued)
- [Qemu-devel] [PATCH v3 3/3] Fix address handling in inet_nonblocking_connect, Orit Wasserman, 2012/09/13
- Re: [Qemu-devel] [PATCH v3 3/3] Fix address handling in inet_nonblocking_connect, Juan Quintela, 2012/09/14
- Re: [Qemu-devel] [PATCH v3 3/3] Fix address handling in inet_nonblocking_connect, Amos Kong, 2012/09/19
- Re: [Qemu-devel] [PATCH v3 3/3] Fix address handling in inet_nonblocking_connect, Orit Wasserman, 2012/09/20
- Re: [Qemu-devel] [PATCH v3 3/3] Fix address handling in inet_nonblocking_connect, Amos Kong, 2012/09/20
- Re: [Qemu-devel] [PATCH v3 3/3] Fix address handling in inet_nonblocking_connect, Orit Wasserman, 2012/09/23
- Re: [Qemu-devel] [PATCH v3 3/3] Fix address handling in inet_nonblocking_connect, Amos Kong, 2012/09/24
- Re: [Qemu-devel] [PATCH v3 3/3] Fix address handling in inet_nonblocking_connect, Orit Wasserman, 2012/09/24
- Re: [Qemu-devel] [PATCH v3 3/3] Fix address handling in inet_nonblocking_connect, Amos Kong, 2012/09/24
Re: [Qemu-devel] [PATCH v3 3/3] Fix address handling in inet_nonblocking_connect,
Michael S. Tsirkin <=
Re: [Qemu-devel] [PATCH v3 3/3] Fix address handling in inet_nonblocking_connect, Markus Armbruster, 2012/09/20
[Qemu-devel] [PATCH v3 2/3] Separate inet_connect into inet_connect (blocking) and inet_nonblocking_connect, Orit Wasserman, 2012/09/13