diff mbox

[09/14] migration: Add buffered_flush error handling

Message ID 1358248702-14278-10-git-send-email-quintela@redhat.com
State New
Headers show

Commit Message

Juan Quintela Jan. 15, 2013, 11:18 a.m. UTC
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(-)
diff mbox

Patch

diff --git a/migration.c b/migration.c
index 7ae1d93..17eb27d 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;
         }