[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/4] socket: Rationalise function declarations
From: |
Ian Molton |
Subject: |
Re: [Qemu-devel] [PATCH 1/4] socket: Rationalise function declarations |
Date: |
Sun, 27 Dec 2009 22:29:51 +0000 |
User-agent: |
Mozilla-Thunderbird 2.0.0.22 (X11/20091109) |
Ian Molton wrote:
Can I get the status of this patchset please ?
Thanks!
> This patch rationalises the declaration of inet_listen_opts such that
> it matches the other inet_{listen,connect}_opts functions.
>
> This change is needed for a patch adding socket reconection support.
>
> Signed-off-by: Ian Molton <address@hidden>
> ---
> qemu-sockets.c | 9 +++++++--
> qemu_socket.h | 2 +-
> 2 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/qemu-sockets.c b/qemu-sockets.c
> index 8850516..ea338de 100644
> --- a/qemu-sockets.c
> +++ b/qemu-sockets.c
> @@ -116,7 +116,7 @@ static void inet_print_addrinfo(const char *tag, struct
> addrinfo *res)
> }
> }
>
> -int inet_listen_opts(QemuOpts *opts, int port_offset)
> +static int do_inet_listen(QemuOpts *opts, int port_offset)
> {
> struct addrinfo ai,*res,*e;
> const char *addr;
> @@ -216,6 +216,11 @@ listen:
> return slisten;
> }
>
> +int inet_listen_opts(QemuOpts *opts)
> +{
> + return do_inet_listen(opts, 0);
> +}
> +
> int inet_connect_opts(QemuOpts *opts)
> {
> struct addrinfo ai,*res,*e;
> @@ -465,7 +470,7 @@ int inet_listen(const char *str, char *ostr, int olen,
>
> opts = qemu_opts_create(&dummy_opts, NULL, 0);
> if (inet_parse(opts, str) == 0) {
> - sock = inet_listen_opts(opts, port_offset);
> + sock = do_inet_listen(opts, port_offset);
> if (sock != -1 && ostr) {
> optstr = strchr(str, ',');
> if (qemu_opt_get_bool(opts, "ipv6", 0)) {
> diff --git a/qemu_socket.h b/qemu_socket.h
> index 86bdbf5..fd8b95b 100644
> --- a/qemu_socket.h
> +++ b/qemu_socket.h
> @@ -38,7 +38,7 @@ void socket_set_nonblock(int fd);
> int send_all(int fd, const void *buf, int len1);
>
> /* New, ipv6-ready socket helper functions, see qemu-sockets.c */
> -int inet_listen_opts(QemuOpts *opts, int port_offset);
> +int inet_listen_opts(QemuOpts *opts);
> int inet_listen(const char *str, char *ostr, int olen,
> int socktype, int port_offset);
> int inet_connect_opts(QemuOpts *opts);