migration: Add buffered_flush error handling

Now that we have error handling we can do proper handling of
buffered_flush().

Signed-off-by: Juan Quintela <quintela@redhat.com>

Reviewed-by: Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Juan Quintela 2012-12-10 22:29:14 +01:00
parent 76f5933aea
commit f7b67be36d

View File

@ -757,7 +757,8 @@ static void *buffered_file_thread(void *opaque)
/* usleep expects microseconds */
g_usleep((initial_time + BUFFER_DELAY - current_time)*1000);
}
if (buffered_flush(s) < 0) {
ret = buffered_flush(s);
if (ret < 0) {
break;
}