buffered_file: Use right "opaque"
authorJuan Quintela <quintela@redhat.com>
Wed, 21 Sep 2011 16:12:58 +0000 (18:12 +0200)
committerJuan Quintela <quintela@redhat.com>
Thu, 20 Oct 2011 11:23:51 +0000 (13:23 +0200)
buffered_close 's' variable is of type QEMUFileBuffered, and
wait_for_unfreeze() expect to receive a MigrationState, that
'coincidentaly' is s->opaque.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
buffered_file.c

index 94ecbbc..decc3bf 100644 (file)
@@ -176,7 +176,7 @@ static int buffered_close(void *opaque)
     while (!s->has_error && s->buffer_size) {
         buffered_flush(s);
         if (s->freeze_output)
-            s->wait_for_unfreeze(s);
+            s->wait_for_unfreeze(s->opaque);
     }
 
     ret = s->close(s->opaque);