migration: If there is one error, it makes no sense to continue

Once there, add a comment about what each error mean.

Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
Juan Quintela 2011-02-23 20:17:45 +01:00
parent 2350e13c93
commit 4fc7d8195f
1 changed files with 9 additions and 3 deletions

View File

@ -189,13 +189,19 @@ static int buffered_close(void *opaque)
return ret;
}
/*
* The meaning of the return values is:
* 0: We can continue sending
* 1: Time to stop
* -1: There has been an error
*/
static int buffered_rate_limit(void *opaque)
{
QEMUFileBuffered *s = opaque;
if (s->has_error)
return 0;
if (s->has_error) {
return -1;
}
if (s->freeze_output)
return 1;