aboutsummaryrefslogtreecommitdiff
path: root/migration/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'migration/socket.c')
-rw-r--r--migration/socket.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/migration/socket.c b/migration/socket.c
index 5fdc723ca3..32032764a0 100644
--- a/migration/socket.c
+++ b/migration/socket.c
@@ -25,30 +25,30 @@
#include "trace.h"
-static SocketAddress *tcp_build_address(const char *host_port, Error **errp)
+static SocketAddressLegacy *tcp_build_address(const char *host_port, Error **errp)
{
InetSocketAddress *iaddr = g_new(InetSocketAddress, 1);
- SocketAddress *saddr;
+ SocketAddressLegacy *saddr;
if (inet_parse(iaddr, host_port, errp)) {
qapi_free_InetSocketAddress(iaddr);
return NULL;
}
- saddr = g_new0(SocketAddress, 1);
- saddr->type = SOCKET_ADDRESS_KIND_INET;
+ saddr = g_new0(SocketAddressLegacy, 1);
+ saddr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
saddr->u.inet.data = iaddr;
return saddr;
}
-static SocketAddress *unix_build_address(const char *path)
+static SocketAddressLegacy *unix_build_address(const char *path)
{
- SocketAddress *saddr;
+ SocketAddressLegacy *saddr;
- saddr = g_new0(SocketAddress, 1);
- saddr->type = SOCKET_ADDRESS_KIND_UNIX;
+ saddr = g_new0(SocketAddressLegacy, 1);
+ saddr->type = SOCKET_ADDRESS_LEGACY_KIND_UNIX;
saddr->u.q_unix.data = g_new0(UnixSocketAddress, 1);
saddr->u.q_unix.data->path = g_strdup(path);
@@ -90,14 +90,14 @@ static void socket_outgoing_migration(QIOTask *task,
}
static void socket_start_outgoing_migration(MigrationState *s,
- SocketAddress *saddr,
+ SocketAddressLegacy *saddr,
Error **errp)
{
QIOChannelSocket *sioc = qio_channel_socket_new();
struct SocketConnectData *data = g_new0(struct SocketConnectData, 1);
data->s = s;
- if (saddr->type == SOCKET_ADDRESS_KIND_INET) {
+ if (saddr->type == SOCKET_ADDRESS_LEGACY_KIND_INET) {
data->hostname = g_strdup(saddr->u.inet.data->host);
}
@@ -107,7 +107,7 @@ static void socket_start_outgoing_migration(MigrationState *s,
socket_outgoing_migration,
data,
socket_connect_data_free);
- qapi_free_SocketAddress(saddr);
+ qapi_free_SocketAddressLegacy(saddr);
}
void tcp_start_outgoing_migration(MigrationState *s,
@@ -115,7 +115,7 @@ void tcp_start_outgoing_migration(MigrationState *s,
Error **errp)
{
Error *err = NULL;
- SocketAddress *saddr = tcp_build_address(host_port, &err);
+ SocketAddressLegacy *saddr = tcp_build_address(host_port, &err);
if (!err) {
socket_start_outgoing_migration(s, saddr, &err);
}
@@ -126,7 +126,7 @@ void unix_start_outgoing_migration(MigrationState *s,
const char *path,
Error **errp)
{
- SocketAddress *saddr = unix_build_address(path);
+ SocketAddressLegacy *saddr = unix_build_address(path);
socket_start_outgoing_migration(s, saddr, errp);
}
@@ -160,7 +160,7 @@ out:
}
-static void socket_start_incoming_migration(SocketAddress *saddr,
+static void socket_start_incoming_migration(SocketAddressLegacy *saddr,
Error **errp)
{
QIOChannelSocket *listen_ioc = qio_channel_socket_new();
@@ -170,7 +170,7 @@ static void socket_start_incoming_migration(SocketAddress *saddr,
if (qio_channel_socket_listen_sync(listen_ioc, saddr, errp) < 0) {
object_unref(OBJECT(listen_ioc));
- qapi_free_SocketAddress(saddr);
+ qapi_free_SocketAddressLegacy(saddr);
return;
}
@@ -179,13 +179,13 @@ static void socket_start_incoming_migration(SocketAddress *saddr,
socket_accept_incoming_migration,
listen_ioc,
(GDestroyNotify)object_unref);
- qapi_free_SocketAddress(saddr);
+ qapi_free_SocketAddressLegacy(saddr);
}
void tcp_start_incoming_migration(const char *host_port, Error **errp)
{
Error *err = NULL;
- SocketAddress *saddr = tcp_build_address(host_port, &err);
+ SocketAddressLegacy *saddr = tcp_build_address(host_port, &err);
if (!err) {
socket_start_incoming_migration(saddr, &err);
}
@@ -194,6 +194,6 @@ void tcp_start_incoming_migration(const char *host_port, Error **errp)
void unix_start_incoming_migration(const char *path, Error **errp)
{
- SocketAddress *saddr = unix_build_address(path);
+ SocketAddressLegacy *saddr = unix_build_address(path);
socket_start_incoming_migration(saddr, errp);
}