diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-02-22 17:36:42 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2013-03-11 13:32:02 +0100 |
commit | e6a1cf21328802f3a83e84e893b8cb8a468141cc (patch) | |
tree | 57ca206cbfe0dd6640a9a5f585692016c6182b11 /migration-tcp.c | |
parent | f8bbc1286337a8506162b5785babe6f2a7de2476 (diff) | |
download | qemu-e6a1cf21328802f3a83e84e893b8cb8a468141cc.tar.gz qemu-e6a1cf21328802f3a83e84e893b8cb8a468141cc.tar.bz2 qemu-e6a1cf21328802f3a83e84e893b8cb8a468141cc.zip |
migration: use QEMUFile for writing outgoing migration data
Second, drop the file descriptor indirection, and write directly to the
QEMUFile.
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration-tcp.c')
-rw-r--r-- | migration-tcp.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/migration-tcp.c b/migration-tcp.c index 1e8e00411b..5ea4f3d2b6 100644 --- a/migration-tcp.c +++ b/migration-tcp.c @@ -29,16 +29,6 @@ do { } while (0) #endif -static int socket_errno(MigrationState *s) -{ - return socket_error(); -} - -static int socket_write(MigrationState *s, const void * buf, size_t size) -{ - return send(s->fd, buf, size, 0); -} - static void tcp_wait_for_connect(int fd, void *opaque) { MigrationState *s = opaque; @@ -56,8 +46,6 @@ static void tcp_wait_for_connect(int fd, void *opaque) void tcp_start_outgoing_migration(MigrationState *s, const char *host_port, Error **errp) { - s->get_error = socket_errno; - s->write = socket_write; inet_nonblocking_connect(host_port, tcp_wait_for_connect, s, errp); } |