From f7b67be36d01f8f506dc93213855b31dad17708c Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Mon, 10 Dec 2012 22:29:14 +0100 Subject: [PATCH] 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 Reviewed-by: Reviewed-by: Eric Blake Reviewed-by: Paolo Bonzini --- migration.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migration.c b/migration.c index 7ae1d939d6..17eb27d199 100644 --- a/migration.c +++ b/migration.c @@ -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; }