util: Drop inet_listen()

Since commit e65c67e4, inet_listen() is not used anymore, and all
inet listen operation goes through QIOChannel.

Cc: Daniel P. Berrange <berrange@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Eric Blake <eblake@redhat.com>

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Message-Id: <1469451771-1173-3-git-send-email-caoj.fnst@cn.fujitsu.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Cao jin 2016-07-25 21:02:51 +08:00 committed by Paolo Bonzini
parent f8ea7a8656
commit 767db021bc
2 changed files with 0 additions and 30 deletions

View File

@ -33,8 +33,6 @@ int socket_set_fast_reuse(int fd);
typedef void NonBlockingConnectHandler(int fd, Error *err, void *opaque);
InetSocketAddress *inet_parse(const char *str, Error **errp);
int inet_listen(const char *str, char *ostr, int olen,
int socktype, int port_offset, Error **errp);
int inet_connect(const char *str, Error **errp);
NetworkAddressFamily inet_netfamily(int family);

View File

@ -624,34 +624,6 @@ fail:
return NULL;
}
int inet_listen(const char *str, char *ostr, int olen,
int socktype, int port_offset, Error **errp)
{
char *optstr;
int sock = -1;
InetSocketAddress *addr;
addr = inet_parse(str, errp);
if (addr != NULL) {
sock = inet_listen_saddr(addr, port_offset, true, errp);
if (sock != -1 && ostr) {
optstr = strchr(str, ',');
if (addr->ipv6) {
snprintf(ostr, olen, "[%s]:%s%s",
addr->host,
addr->port,
optstr ? optstr : "");
} else {
snprintf(ostr, olen, "%s:%s%s",
addr->host,
addr->port,
optstr ? optstr : "");
}
}
qapi_free_InetSocketAddress(addr);
}
return sock;
}
/**
* Create a blocking socket and connect it to an address.