Patchwork [21/35] migration: Add buffered_flush error handling

login
register
mail settings
Submitter Juan Quintela
Date Dec. 11, 2012, 12:46 p.m.
Message ID <1355230031-28233-22-git-send-email-quintela@redhat.com>
Download mbox | patch
Permalink /patch/205208/
State New
Headers show

Comments

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

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;
         }