[21/35] migration: Add buffered_flush error handling

Submitted by Juan Quintela on Dec. 11, 2012, 12:46 p.m.

Details

Message ID 1355230031-28233-22-git-send-email-quintela@redhat.com
State New
Headers show

Commit Message

Juan Quintela Dec. 11, 2012, 12:46 p.m.
Now that we have error handling we can do proper handling of
buffered_flush().

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/migration.c b/migration.c
index 336941b..031302b 100644
--- a/migration.c
+++ b/migration.c
@@ -768,7 +768,8 @@  static void *buffered_file_thread(void *opaque)
             /* usleep expects microseconds */
             usleep((initial_time + BUFFER_DELAY - current_time)*1000);
         }
-        if (buffered_flush(s) < 0) {
+        ret = buffered_flush(s);
+        if (ret < 0) {
             break;
         }