@@ -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)) {
@@ -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);
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 <ian.molton@collabora.co.uk> --- qemu-sockets.c | 9 +++++++-- qemu_socket.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-)